mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-28 16:11:29 +00:00
[libc++] Fix the build with GCC < 10
For now, we still need to support older GCCs, so work around the lack of __is_constructible on older GCCs.
This commit is contained in:
parent
aff896dea1
commit
04fce1515b
@ -2883,7 +2883,11 @@ namespace __is_construct
|
||||
struct __nat {};
|
||||
}
|
||||
|
||||
#if !defined(_LIBCPP_CXX03_LANG) && !__has_feature(is_constructible) && !defined(_LIBCPP_COMPILER_GCC)
|
||||
#if defined(_LIBCPP_COMPILER_GCC) && _GNUC_VER_NEW >= 10000
|
||||
# define _LIBCPP_GCC_SUPPORTS_IS_CONSTRUCTIBLE
|
||||
#endif
|
||||
|
||||
#if !defined(_LIBCPP_CXX03_LANG) && !__has_feature(is_constructible) && !defined(_LIBCPP_GCC_SUPPORTS_IS_CONSTRUCTIBLE)
|
||||
|
||||
template <class _Tp, class... _Args>
|
||||
struct __libcpp_is_constructible;
|
||||
@ -2998,7 +3002,7 @@ struct __libcpp_is_constructible<_Tp&&, _A0>
|
||||
|
||||
#endif
|
||||
|
||||
#if __has_feature(is_constructible) || defined(_LIBCPP_COMPILER_GCC)
|
||||
#if __has_feature(is_constructible) || defined(_LIBCPP_GCC_SUPPORTS_IS_CONSTRUCTIBLE)
|
||||
template <class _Tp, class ..._Args>
|
||||
struct _LIBCPP_TEMPLATE_VIS is_constructible
|
||||
: public integral_constant<bool, __is_constructible(_Tp, _Args...)>
|
||||
|
@ -11,6 +11,8 @@
|
||||
// template <class T, class... Args>
|
||||
// struct is_constructible;
|
||||
|
||||
// UNSUPPORTED: gcc-5, gcc-6, gcc-7, gcc-8, gcc-9
|
||||
|
||||
#include <type_traits>
|
||||
#include "test_macros.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user