Am Donnerstag, 10. Dezember 2015 um 23:39:17, schrieb Peter Kümmel 
<syntheti...@gmx.net>
> On 10.12.2015 22:48, Kornel Benko wrote:
> > Am Donnerstag, 10. Dezember 2015 um 21:12:36, schrieb Georg Baum 
> > <georg.b...@post.rwth-aachen.de>
> >> 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.
> >
> > Maybe also use '--debug-output' as an extra cmake parameter. Than also the 
> > file CMakeFiles/CMakeOutput.log may be of interest.
> > I'd like to have both files too.
> >
> >>> 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.
> >>
> >
> > OK.
> >
> >> Georg
> >
> >     Kornel
> >
> 
> Isn't this too much trouble? msvc2013 and msvc2015 have C++11 enabled by 
> default.
> Not much to do in the cmake files, and whan something has to be changed just 
> use
> cmake variables MSVC2012/MSVC2014. Or have I missed something?

I think yes. I'd like use some built-in tests to check for compiler features.
That way we may have less conditional code in cmake scripts.

And to know, why a compilation fails, is of some value too.

> Peter

        Kornel

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to