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

size_gt.hpp
Go to the documentation of this file.
1 
9 #ifndef EAGINE_VALID_IF_SIZE_GT_HPP
10 #define EAGINE_VALID_IF_SIZE_GT_HPP
11 
12 #include "in_class.hpp"
13 
14 namespace eagine {
15 
18 template <typename C, typename T>
20 
22  auto operator()(const C& c, T s) const {
23  return c.size() > s;
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>
31  void operator()(Log& log, const C& c, const T& s) const {
32  log << "Size " << c.size() << ", "
33  << "not greater than value " << s << " is invalid";
34  }
35  };
36 };
37 
41 template <typename C, typename T>
43 
44 } // namespace eagine
45 
46 #endif // EAGINE_VALID_IF_SIZE_GT_HPP
Policy class for containers valid if their size is larger than specified number.
Definition: size_gt.hpp:19
Common code is placed in this namespace.
Definition: eagine.hpp:21
auto operator()(const C &c, T s) const
Indicates value validity, true if c.size() > s.
Definition: size_gt.hpp:22
Basic template for conditionally-valid values.
Definition: base.hpp:86

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