OGLplus  (0.59.0) a C++ wrapper for rendering APIs

type_traits.hpp
Go to the documentation of this file.
1 
9 #ifndef EAGINE_TYPE_TRAITS_HPP
10 #define EAGINE_TYPE_TRAITS_HPP
11 
12 #include <type_traits>
13 
14 namespace eagine {
15 
16 template <typename X, typename Match>
17 using disable_if_same_t = std::enable_if_t<
18  !std::is_same_v<std::remove_cv_t<std::remove_reference_t<X>>, Match>>;
19 
20 template <typename Sig>
21 struct is_noexcept_function;
22 
23 template <typename Sig>
24 using is_noexcept_function_t = typename is_noexcept_function<Sig>::type;
25 
26 template <typename Sig>
27 inline constexpr bool is_noexcept_function_v = is_noexcept_function<Sig>::value;
28 
29 template <typename RV, typename... P>
30 struct is_noexcept_function<RV(P...)> : std::false_type {};
31 
32 template <typename RV, typename... P>
33 struct is_noexcept_function<RV(P...) noexcept> : std::true_type {};
34 
35 } // namespace eagine
36 
37 #endif // EAGINE_TYPE_TRAITS_HPP
Common code is placed in this namespace.
Definition: eagine.hpp:21

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).