Support Class Library
A set of tools providing classes and utility
LessThanComparable.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 namespace scl{
6  namespace concepts{
11  template <class T>
13  constexpr operator bool() const{
14  using namespace scl::tools;
15  static_assert(meta::is_convertible<
16  decltype(std::declval<T>() < std::declval<T>()),
17  bool
18  >(), "LessThanComparable<T>: operator< is not/poorly defined for T");
19  return true;
20  }
21  };
22  }
23 }
Global namespace of the SCL.
Definition: alias.hpp:3
LessThanComparable concept, a type T is less than comparable if it defines an operator< with itself...
constexpr bool is_convertible()
An handy function for the result of std::is_convertible.
General purpose tooling.
Definition: iostream.hpp:4