Support Class Library
A set of tools providing classes and utility
AssignableWith.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <scl/macros.h>
5 
6 namespace scl{
7  namespace concepts{
13  template <class T, class U>
15  constexpr operator bool() const{
16  static_assert(META::exists<decltype(
17  std::declval<T>() = std::declval<U>()
18  )>(), "AssignableWith<T,U>: Should be able to T = U");
19  return true;
20  }
21  };
22  }
23 }
Global namespace of the SCL.
Definition: alias.hpp:3
AssignableWith concept, a type U is assignable to a type T if operator=() is defined for both types (...
constexpr bool exists()
Determines whether or not the given type is well-formed.
Definition: exists.h:23