VS
Size: a a a
VS
AF
template <typename T>
concept callable_with_tag = requires(T obj, tag&& t) {
{ obj(move(t)) }'
};
D
VS
VS
VS
AF
AF
AF
VS
AF
AF
VS
D
struct tag; // forward declПоведение же будет такое, как и с инстанциациями шаблонов -- будет окончательная проверка только при самой инстанциации?
template <typename T>
concept callable_with_tag = requires(T obj) {
{ obj(std::declval<tag>()) }'
};
struct tag {}; // definition
template <typename T>
requires callable_with_tag<T>
void foo() {
...
};
VS
NP
AF
AF
TW