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

Aaron Ballman aaron at aaronballman.com
Thu Sep 22 11:12:06 PDT 2011


On Thu, Sep 22, 2011 at 10:33 AM, Ruben Van Boxem
<vanboxem.ruben at gmail.com> wrote:
> 2011/6/30 Ruben Van Boxem <vanboxem.ruben at gmail.com>
> - include/__config/type_traits: add a define _LIBCXX_HAS_FEATURE_IS_BASE_OF
> for MSVC and GCC, which both have this, but not __has_feature, which is
> Clang-only. Modify <type_traits> accordingly.

I noticed that you're testing _MSC_VER 1400, which is VS 2005.
However, I couldn't find any documentation of is_base_of for anything
before Visual Studio 2008 (_MSC_VER 1500).  Unfortunately, I don't
have VS 2005 to test for sure, but this may require a second look.  Or
I could be wrong.  ;-)

> All this should work for both MinGW(-w64)/GCC and Microsoft/MSVC
> headers/libraries. Note the *_l functions are only available on recent
> Windows versions, which should be good enough for now. Especially the locale
> stuff (up till now!) should work for more than only plain "C" locale.

It's more dependent on the MSVCRT version on the system than the OS.
I've seen the _l versions of the APIs with VS 2005, and the claimed
support (assuming the proper redist is installed) is as far back as
Windows 95.

Overall, I think the patch looks good though.

~Aaron



More information about the cfe-dev mailing list