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