Question Details

No question body available.

Tags

c++ variadic-functions type-traits c++23 move-constructor

Answers (1)

Accepted Answer Available
Accepted Answer
July 7, 2026 Score: 7 Rep: 230,872 Quality: Expert Completeness: 80%

You cannot pass a NoMove object to variadic parameters .... Passing it requires NoMove be copyable/movable which it is not.

From variadicarguments, emphasis mine:

Non-POD class types(until C++11)Scoped enumerations and class types with an eligible non-trivial copy constructor, an eligible non-trivial move constructor, or a non-trivial destructor(since C++11) are conditionally-supported in potentially-evaluated calls with implementation-defined semantics (these types are always supported in unevaluated calls).

So with regular calls, the behavior is up-to the compiler; Does it support it? Does it copy/move it, take by reference? ...

With unevaluated context (as decltype), those type are always supported (probably for SFINAE support).