diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index c030ad71..c2a735f5 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -10,6 +10,14 @@ #define BOOST_HAS_PRAGMA_ONCE +// When compiling with clang before __has_extension was defined, +// even if one writes 'defined(__has_extension) && __has_extension(xxx)', +// clang reports a compiler error. So the only workaround found is: + +#ifndef __has_extension +#define __has_extension __has_feature +#endif + #if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS #endif diff --git a/include/boost/config/stdlib/dinkumware.hpp b/include/boost/config/stdlib/dinkumware.hpp index a0ed8702..f31a0cdd 100644 --- a/include/boost/config/stdlib/dinkumware.hpp +++ b/include/boost/config/stdlib/dinkumware.hpp @@ -86,7 +86,7 @@ # define BOOST_NO_STD_LOCALE #endif -// Fix for VC++ 8.0 on up ( I do not have a previous vesion to test ) +// Fix for VC++ 8.0 on up ( I do not have a previous version to test ) // or clang-cl. If exceptions are off you must manually include the // header before including the header. Admittedly // trying to use Boost libraries or the standard C++ libraries without diff --git a/test/boost_no_cxx11_user_lit.ipp b/test/boost_no_cxx11_user_lit.ipp index 375902f7..d1c2054a 100644 --- a/test/boost_no_cxx11_user_lit.ipp +++ b/test/boost_no_cxx11_user_lit.ipp @@ -19,7 +19,7 @@ struct my_literal constexpr my_literal() : val(0) {} constexpr my_literal(int i) : val(i) {} constexpr my_literal(const my_literal& a) : val(a.val) {} - constexpr bool operator==(const my_literal& a) { return val == a.val; } + constexpr bool operator==(const my_literal& a) const { return val == a.val; } int val; };