[config] Patch for clang.hpp to support clang in Windows using VC++ RTL

Once Boost 1.55 is out the doors can I apply the attached patch for clang when _MSC_VER is defined ? Unfortunately clang in this situation does not currently support the C++11 types char16_t or char32_t ( there is a bug report for this ), and this means trying to compile Boost libraries like type_traits without this patch yields many errors. I would have used the BOOST_WORKAROUND macro but clang does not support a value which gives a single number for the compiler version so I felt that drumming up multiple BOOST_WORKAROUNDs using major/minor/patch version numbers was too much of a hack to bother about.

On 14 October 2013 02:52, Edward Diener
I would have used the BOOST_WORKAROUND macro but clang does not support a value which gives a single number for the compiler version so I felt that drumming up multiple BOOST_WORKAROUNDs using major/minor/patch version numbers was too much of a hack to bother about.
It's not recommended to use Clang version numbers at all: http://lists.boost.org/Archives/boost/2011/06/182574.php I suppose using them in combination with checking for _MSC_VER is safe at the moment, but might not always be.

On 10/14/2013 6:26 AM, Daniel James wrote:
On 14 October 2013 02:52, Edward Diener
wrote: I would have used the BOOST_WORKAROUND macro but clang does not support a value which gives a single number for the compiler version so I felt that drumming up multiple BOOST_WORKAROUNDs using major/minor/patch version numbers was too much of a hack to bother about.
It's not recommended to use Clang version numbers at all:
I am aware of that. I could not find a __has_feature/__has_extension for checking support for char16_t or char32_t in clang. Anyway my patch just checks for _MSC_VER for the time being.
I suppose using them in combination with checking for _MSC_VER is safe at the moment, but might not always be.
Understood.

On 14 October 2013 15:13, Edward Diener
On 10/14/2013 6:26 AM, Daniel James wrote:
On 14 October 2013 02:52, Edward Diener
wrote: I would have used the BOOST_WORKAROUND macro but clang does not support a value which gives a single number for the compiler version so I felt that drumming up multiple BOOST_WORKAROUNDs using major/minor/patch version numbers was too much of a hack to bother about.
It's not recommended to use Clang version numbers at all:
I am aware of that. I could not find a __has_feature/__has_extension for checking support for char16_t or char32_t in clang. Anyway my patch just checks for _MSC_VER for the time being.
Sorry, that wasn't meant to be criticism, I was saying that you're doing the right thing. If they add support, hopefully they can give some guidance as to how to detect it.
participants (2)
-
Daniel James
-
Edward Diener