std::experimental::ranges::Assignable
Header: <experimental/ranges/concepts>
The concept Assignable<T, U> specifies that an expression of the type and value category specified by U can be assigned to an lvalue expression whose type is specified by T.
# Declarations
template< class T, class U >
concept bool Assignable =
std::is_lvalue_reference<T>::value &&
CommonReference<
const std::remove_reference_t<T>&,
const std::remove_reference_t<U>&> &&
requires(T t, U&& u) {
{ t = std::forward<U>(u) } -> Same<T>&&;
};
(ranges TS)
# Notes
A deduction constraint of the form { expression } -> Same
Assignment need not be a total function. In particular, if assigning to some object x can cause some other object y to be modified, then x = y is likely not in the domain of =. This typically happens if the right operand is owned directly or indirectly by the left operand (e.g., with smart pointers to nodes in a node-based data structure, or with something like std::vector<std::any>).