【发布时间】:2019-01-19 08:35:46
【问题描述】:
requires expression 通常类似于:requires ( parameter-list(optional) ) { requirement-seq }。
是否可以在不使用requires constraint-expr 的情况下在序列中形成析取(||)作为要求。例如:
template<typename T> concept FooBarExpert =
requires(T a, T b) {
{a.foo(b)} || {a.bar(b)}; // Req 1
{ a.baz() }; // Req 2
// and onward
};
【问题讨论】:
标签: c++ c++-concepts c++20