Support Class Library
A set of tools providing classes and utility
InequalityComparable.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  >(), "InequalityComparable<T>: operator== is not/poorly defined for T");
19  return true;
20  }
21  };
22  }
23 }
InequalityComparable concept, a type T is equality comparable if it defines an operator!= with itself...
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