[cfe-dev] [PATCH] Libc++ Windows fixes
Ruben Van Boxem
vanboxem.ruben at gmail.com
Sun Oct 23 03:22:08 PDT 2011
2011/10/23 Howard Hinnant <hhinnant at apple.com>
> 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>
>
Yeah, indeed, <shrug> :). There are reports on the internet that decltype is
buggy in MSVC 10. I'll see if I can try MSVC 11 (Developer preview) and see
where that gets me.
For reference, the bug report submitted to MS is here (feel free to "upvote"
it if you can ;-):
https://connect.microsoft.com/VisualStudio/feedback/details/696201/template-c-11-code-being-rejected-although-it-is-correct
I am now attempting to use MSVC based Clang, and it seems to work better, if
I do this to CMAKE_CXX_FLAGS:
-nostdinc -I"M:\Development\Source\libc++\include" -I"C:\Program Files
(x86)\Microsoft Visual Studio 10.0\VC\include" -I"C:\Program Files\Microsoft
SDKs\Windows\v7.1\Include"
I'll run into a missing pthreads soon enough (although I can use on
pthreads-win32 when it comes to that). More patches coming up (oh, yes,
there are even more missing functions in Visual Studio headers, what a
surprise!)
Ruben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111023/b257c7af/attachment.html>
More information about the cfe-dev
mailing list