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

instead_of.hpp
Go to the documentation of this file.
1 #ifndef EAGINE_INSTEAD_OF_HPP
9 #define EAGINE_INSTEAD_OF_HPP
10 
11 namespace eagine {
12 
16 template <typename Src, typename Dst>
17 struct instead_of {
19  using type = Dst;
20 
21  static constexpr Dst value(Dst val) noexcept {
22  return val;
23  }
24 };
25 
28 template <typename Src, typename Dst>
30 
31 } // namespace eagine
32 
33 #endif // EAGINE_INSTEAD_OF_HPP
Common code is placed in this namespace.
Definition: eagine.hpp:21
Definition: instead_of.hpp:17
typename instead_of< Src, Dst >::type instead_of_t
Definition: instead_of.hpp:29
Dst type
The result type.
Definition: instead_of.hpp:19

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