Browse Source

* Added #ifdef for C++ version (C++14, C++17)

master
bergmann 4 years ago
parent
commit
31abdcd026
3 changed files with 16 additions and 2 deletions
  1. +5
    -2
      include/cppmp/core/checker.h
  2. +8
    -0
      include/cppmp/core/conditionals.h
  3. +3
    -0
      include/cppmp/core/modifier.h

+ 5
- 2
include/cppmp/core/checker.h View File

@@ -78,12 +78,10 @@ namespace cppmp
cppmp_define_checker(is_standard_layout);
cppmp_define_checker(is_pod);
cppmp_define_checker(is_literal_type);
cppmp_define_checker(has_unique_object_representations);
cppmp_define_checker(is_empty);
cppmp_define_checker(is_polymorphic);
cppmp_define_checker(is_abstract);
cppmp_define_checker(is_final);
cppmp_define_checker(is_aggregate);
cppmp_define_checker(is_signed);
cppmp_define_checker(is_unsigned);
cppmp_define_checker(is_constructible);
@@ -121,10 +119,15 @@ namespace cppmp
cppmp_define_checker(is_same);
cppmp_define_checker(is_base_of);
cppmp_define_checker(is_convertible);

#if __cplusplus >= 201703L
cppmp_define_checker(has_unique_object_representations);
cppmp_define_checker(is_aggregate);
cppmp_define_checker(is_invocable);
cppmp_define_checker(is_invocable_r);
cppmp_define_checker(is_nothrow_invocable);
cppmp_define_checker(is_nothrow_invocable_r);
#endif

}



+ 8
- 0
include/cppmp/core/conditionals.h View File

@@ -79,6 +79,8 @@ namespace cppmp

/* conjunction/and */

#if __cplusplus >= 201703L

/**
* @brief Evaluates to true_t if all passed arguments are also true_t.
*/
@@ -107,8 +109,12 @@ namespace cppmp
template<typename... T>
constexpr decltype(auto) and_v = conjunction<T...>::value;

#endif

/* disjunction/or */

#if __cplusplus >= 201703L

/**
* @brief Evaluates to true_t if at least one passed arguments is true_t.
*/
@@ -137,6 +143,8 @@ namespace cppmp
template<typename... T>
constexpr decltype(auto) or_v = disjunction<T...>::value;

#endif

}

#include "conditionals.inl"

+ 3
- 0
include/cppmp/core/modifier.h View File

@@ -36,7 +36,10 @@ namespace cppmp
cppmp_define_modifier(common_type);
cppmp_define_modifier(underlying_type);
cppmp_define_modifier(result_of);

#if __cplusplus >= 201703L
cppmp_define_modifier(invoke_result);
#endif

}



Loading…
Cancel
Save