[cfe-dev] [PATCH] Libc++ Windows fixes

Howard Hinnant hhinnant at apple.com
Sat Oct 22 16:22:53 PDT 2011


On Oct 22, 2011, at 6:52 PM, Aaron Ballman wrote:

> On Sat, Oct 22, 2011 at 5:48 PM, Howard Hinnant <hhinnant at apple.com> wrote:
>> On Oct 22, 2011, at 6:29 PM, Ruben Van Boxem wrote:
>> 
>>> OK, attached is a renewed fixed up preprocessed source that gets accepted by Clang and GCC (once you specify -std=c++0x of course <slaps himself on forehead>), but rejected by MSVC 10. I don't assume there's any other way to write this kind of construct, preserving the functionality?
>>> 
>>> I'll take it to MS next. This sucks for libc++ and MSVC...
>> 
>> What's the first error message for MSVC 10?
> 
> Here's what I get:
> 
> 1>c:\users\aaron ballman\desktop\algorithm.cpp(129): error C2516:
> 'std::common_type<_Tp>::type' : is not a legal base class
> 1>          with
> 1>          [
> 1>              _Tp=
> 1>          ]
> 1>          c:\users\aaron ballman\desktop\algorithm.cpp(101) : see
> declaration of 'std::common_type<_Tp>::type'
> 1>          with
> 1>          [
> 1>              _Tp=
> 1>          ]
> 1>          c:\users\aaron ballman\desktop\algorithm.cpp(129) : see
> reference to class template instantiation
> 'std::__is_assignable_imp<_Tp,_Arg,__formal>' being compiled
> 
> ~Aaron

It looks to me like the derivation should be from either false_type or true_type, both of which are legal to derive from. <shrug>

Howard




More information about the cfe-dev mailing list