Quellcode durchsuchen

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

master
bergmann vor 4 Jahren
Ursprung
Commit
31abdcd026
3 geänderte Dateien mit 16 neuen und 2 gelöschten Zeilen
  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 Datei anzeigen

@@ -78,12 +78,10 @@ namespace cppmp
cppmp_define_checker(is_standard_layout); cppmp_define_checker(is_standard_layout);
cppmp_define_checker(is_pod); cppmp_define_checker(is_pod);
cppmp_define_checker(is_literal_type); cppmp_define_checker(is_literal_type);
cppmp_define_checker(has_unique_object_representations);
cppmp_define_checker(is_empty); cppmp_define_checker(is_empty);
cppmp_define_checker(is_polymorphic); cppmp_define_checker(is_polymorphic);
cppmp_define_checker(is_abstract); cppmp_define_checker(is_abstract);
cppmp_define_checker(is_final); cppmp_define_checker(is_final);
cppmp_define_checker(is_aggregate);
cppmp_define_checker(is_signed); cppmp_define_checker(is_signed);
cppmp_define_checker(is_unsigned); cppmp_define_checker(is_unsigned);
cppmp_define_checker(is_constructible); cppmp_define_checker(is_constructible);
@@ -121,10 +119,15 @@ namespace cppmp
cppmp_define_checker(is_same); cppmp_define_checker(is_same);
cppmp_define_checker(is_base_of); cppmp_define_checker(is_base_of);
cppmp_define_checker(is_convertible); 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);
cppmp_define_checker(is_invocable_r); cppmp_define_checker(is_invocable_r);
cppmp_define_checker(is_nothrow_invocable); cppmp_define_checker(is_nothrow_invocable);
cppmp_define_checker(is_nothrow_invocable_r); cppmp_define_checker(is_nothrow_invocable_r);
#endif


} }




+ 8
- 0
include/cppmp/core/conditionals.h Datei anzeigen

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


/* conjunction/and */ /* conjunction/and */


#if __cplusplus >= 201703L

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


#endif

/* disjunction/or */ /* disjunction/or */


#if __cplusplus >= 201703L

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


#endif

} }


#include "conditionals.inl" #include "conditionals.inl"

+ 3
- 0
include/cppmp/core/modifier.h Datei anzeigen

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

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


} }




Laden…
Abbrechen
Speichern