wuzp
Wrong Unit? Zero Points! Compile-time checks for units, coordinate systems and points vs. vectors.
Loading...
Searching...
No Matches
wuzp::CopiesOrMoves Concept Reference

Whether constructing a Class from the arguments copies or moves it, i.e. whether they are a single Class. More...

#include <wuzp/core/helpers.hpp>

Concept definition

template<typename Class, typename... Args>
concept CopiesOrMoves = sizeof...(Args) == 1 && (std::same_as<std::remove_cvref_t<Args>, Class> && ...)
Whether constructing a Class from the arguments copies or moves it, i.e. whether they are a single Cl...
Definition helpers.hpp:69

Detailed Description

Whether constructing a Class from the arguments copies or moves it, i.e. whether they are a single Class.

Forwarding constructors exclude these arguments, so that they do not hijack the copy and move constructors: for a non-const lvalue, a forwarding reference is a better match than the const reference of the copy constructor.

Definition at line 69 of file helpers.hpp.