Support Class Library
A set of tools providing classes and utility
ConvertibleTo.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 namespace scl{
6  namespace concepts{
12  template <class From, class To>
13  struct ConvertibleTo{
14  constexpr operator bool() const{
15  using namespace scl::tools;
16  static_assert(
17  meta::is_convertible<From, To>(),
18  "ConvertibleTo<From, To>: Requirements for concept ConvertibleTo are not met."
19  );
20  return true;
21  }
22  };
23  }
24 }
Conversion concept, a type From is convertible to another type To if meta::is_convertible<From, To>() is true.
Definition: ConvertibleTo.h:13
Global namespace of the SCL.
Definition: alias.hpp:3
General purpose tooling.
Definition: iostream.hpp:4