Kornel Benko wrote:

> I am a bit lost, since the small snippet below does not compile on MSVC
> (for unknown reason)
> 
> ====================================
> template <typename T>
> struct check
> {
>     static_assert(sizeof(int) <= sizeof(T), "not big enough");
> };
> 
> typedef check<check<bool>> right_angle_brackets;
> 
> class TestDeleted
> {
> public:
>     TestDeleted() = delete;
> };
> 
> 
> int a;
> decltype(a) b;
> 
> typedef check<int> check_type;
> check_type c;
> check_type&& cr = static_cast<check_type&&>(c);
> 
> auto d = a;
> 
> int main() {
>   return 0;
> };
> ======================================

It compiles with this MSVC online compiler: http://webcompiler.cloudapp.net/ 
According to https://msdn.microsoft.com/en-us/library/hh567368.aspx#featurelist 
it should also compile with MSVC 2013. 
Earlier versions do not work because of TestDeleted.

Uwe, can you please apply the patch from Kornel in the first message in this 
thread, delete CMakeCache.txt, try to build and then send me  
CMakeFiles/CMakeError.log? It is too big for the list. This file will tell 
us what goes wrong with the test.

> If it compiles (with any needed compiler flags), then the last patch I
> sent (in the starting mail on this thread) should be similar.
> 
> Sources changed slightly in the meantime, so the patch may not apply
> cleanly. My latest guess was the flag "/Ze" to enable MSVC extensions, but
> I got no response ...

Sorry, I overlooked that. /Ze is for Microsoft extensions, this is not 
needed.


Georg

Reply via email to