CD
Size: a a a
CD
DK
CD
MK
MK
DK
ID
AP
W
template <class T>Или концепты так не умеют?
concept constexpr_noexcept_some = requires(T t) {
{ constexpr t.test() const noexcept } // это не работает
->std::same_as<bool>;
};
template <class T>
concept runtime_excepted_mutable_some = requires(T t) {
{ t.test() }
->std::same_as<bool>;
};
AD
template <class T>Или концепты так не умеют?
concept constexpr_noexcept_some = requires(T t) {
{ constexpr t.test() const noexcept } // это не работает
->std::same_as<bool>;
};
template <class T>
concept runtime_excepted_mutable_some = requires(T t) {
{ t.test() }
->std::same_as<bool>;
};
requires(T const t) {
{ t.test() } noexcept -> std::same_as<bool>;
}
AD
noexcept
так, для constexpr
встроенного механизма нетAP
noexcept
так, для constexpr
встроенного механизма нетAP
W
W
AP
test_some(value.test())
AP
AP
W
test_some(value.test())
note: because substituted constraint expression is ill-formed: call to consteval function 'test_some<bool>' is not a constant expression
{test_some(value.test())};
AD
value
в вашем примере). GCC считает его core constant expression, а clang — нет, и я склонен согласиться с clang-ом.