Define a new macro: _LIBCPP_HAS_NO_VARIABLE_TEMPLATES and use it. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@232493 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2015-03-17 15:30:22 +00:00
parent 8e706d2c3e
commit 4d23cc6f55
5 changed files with 16 additions and 8 deletions

View File

@@ -45,12 +45,12 @@ inline namespace fundamentals_v1 {
_LIBCPP_BEGIN_NAMESPACE_CHRONO_LFTS
#if __has_feature(cxx_variable_templates)
#ifndef _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
template <class _Rep> _LIBCPP_CONSTEXPR bool treat_as_floating_point_v
= treat_as_floating_point<_Rep>::value;
#endif /* __has_feature(cxx_variable_templates) */
#endif /* _LIBCPP_HAS_NO_VARIABLE_TEMPLATES */
_LIBCPP_END_NAMESPACE_CHRONO_LFTS

View File

@@ -48,7 +48,7 @@ inline namespace fundamentals_v1 {
_LIBCPP_BEGIN_NAMESPACE_LFTS
#if __has_feature(cxx_variable_templates)
#ifndef _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_equal_v
= ratio_equal<_R1, _R2>::value;
@@ -68,7 +68,7 @@ template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_greater_v
template <class _R1, class _R2> _LIBCPP_CONSTEXPR bool ratio_greater_equal_v
= ratio_greater_equal<_R1, _R2>::value;
#endif /* __has_feature(cxx_variable_templates) */
#endif /* _LIBCPP_HAS_NO_VARIABLE_TEMPLATES */
_LIBCPP_END_NAMESPACE_LFTS

View File

@@ -46,7 +46,7 @@ inline namespace fundamentals_v1 {
_LIBCPP_BEGIN_NAMESPACE_LFTS
#if __has_feature(cxx_variable_templates)
#ifndef _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
template <class _Tp> _LIBCPP_CONSTEXPR bool is_error_code_enum_v
= is_error_code_enum<_Tp>::value;
@@ -54,7 +54,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR bool is_error_code_enum_v
template <class _Tp> _LIBCPP_CONSTEXPR bool is_error_condition_enum_v
= is_error_condition_enum<_Tp>::value;
#endif /* __has_feature(cxx_variable_templates) */
#endif /* _LIBCPP_HAS_NO_VARIABLE_TEMPLATES */
_LIBCPP_END_NAMESPACE_LFTS

View File

@@ -190,7 +190,7 @@ inline namespace fundamentals_v1 {
_LIBCPP_BEGIN_NAMESPACE_LFTS
#if __has_feature(cxx_variable_templates)
#ifndef _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
// C++14 20.10.4.1, primary type categories
@@ -397,7 +397,7 @@ template <class _Tp, class _Up> _LIBCPP_CONSTEXPR bool is_base_of_v
template <class _Tp, class _Up> _LIBCPP_CONSTEXPR bool is_convertible_v
= is_convertible<_Tp, _Up>::value;
#endif /* __has_feature(cxx_variable_templates) */
#endif /* _LIBCPP_HAS_NO_VARIABLE_TEMPLATES */
// 3.3.2, Other type transformations
/*