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

always.hpp
Go to the documentation of this file.
1 
9 #ifndef EAGINE_VALID_IF_ALWAYS_HPP
10 #define EAGINE_VALID_IF_ALWAYS_HPP
11 
12 #include "decl.hpp"
13 
14 namespace eagine {
15 
19 
21  template <typename T>
22  constexpr auto operator()(const T&) const noexcept {
23  return true;
24  }
25 
26  struct do_log {
27  template <typename X, typename = disable_if_same_t<X, do_log>>
28  constexpr do_log(X&&) noexcept {}
29 
30  template <typename Log, typename T>
31  void operator()(Log&, const T&) const {}
32  };
33 };
34 
38 template <typename T>
40 
41 } // namespace eagine
42 
43 #endif // EAGINE_VALID_IF_ALWAYS_HPP
constexpr auto operator()(const T &) const noexcept
Indicates value validity. Always returns true.
Definition: always.hpp:22
Common code is placed in this namespace.
Definition: eagine.hpp:21
Policy for always valid values.
Definition: always.hpp:18
Primary template for conditionally valid values.
Definition: decl.hpp:49

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