Update Clang version check

This commit is contained in:
Peter Dimov
2021-06-14 14:38:26 +03:00
parent a3225e78e2
commit 88a7be42b5
3 changed files with 12 additions and 6 deletions

View File

@ -56,4 +56,10 @@
# define BOOST_SYSTEM_DEPRECATED(msg)
#endif
// BOOST_SYSTEM_CLANG_6
#if defined(__clang__) && (__clang_major__ < 7 || (defined(__APPLE__) && __clang_major__ < 11))
# define BOOST_SYSTEM_CLANG_6
#endif
#endif // BOOST_SYSTEM_DETAIL_CONFIG_HPP_INCLUDED

View File

@ -402,7 +402,7 @@ public:
return *reinterpret_cast<std::error_code*>( d2_ );
}
#if defined(__clang__) && __clang_major__ < 7
#if defined(BOOST_SYSTEM_CLANG_6)
template<class T,
class E = typename std::enable_if<std::is_same<T, std::error_code>::value>::type>

View File

@ -37,7 +37,7 @@ int main()
boost::system::error_code e2( e1 );
f1( e1, e1.value(), e1.category() );
#if !(defined(__clang__) && __clang_major__ < 7)
#if !defined(BOOST_SYSTEM_CLANG_6)
f2( e1, e1.value(), e1.category() );
#endif
@ -49,7 +49,7 @@ int main()
boost::system::error_code e2( e1 );
f1( e1, e1.value(), e1.category() );
#if !(defined(__clang__) && __clang_major__ < 7)
#if !defined(BOOST_SYSTEM_CLANG_6)
f2( e1, e1.value(), e1.category() );
#endif
@ -61,7 +61,7 @@ int main()
boost::system::error_code e2( e1 );
f1( e1, e1.value(), e1.category() );
#if !(defined(__clang__) && __clang_major__ < 7)
#if !defined(BOOST_SYSTEM_CLANG_6)
f2( e1, e1.value(), e1.category() );
#endif
@ -73,7 +73,7 @@ int main()
boost::system::error_code e2( e1 );
f1( e1, e1.value(), e1.category() );
#if !(defined(__clang__) && __clang_major__ < 7)
#if !defined(BOOST_SYSTEM_CLANG_6)
f2( e1, e1.value(), e1.category() );
#endif
@ -85,7 +85,7 @@ int main()
boost::system::error_code e2( e1 );
f1( e1, e1.value(), e1.category() );
#if !(defined(__clang__) && __clang_major__ < 7)
#if !defined(BOOST_SYSTEM_CLANG_6)
f2( e1, e1.value(), e1.category() );
#endif