// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts" } // { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } } #include #include #include template concept cpt_RealScalar = std::is_floating_point::value; namespace detail { template constexpr bool k_evaluator_impl = false; template constexpr bool k_evaluator_impl, E> = true; } template concept cpt_KEvaluator = detail::k_evaluator_impl, X>; int main() { auto f = [](int, int, int) -> double { return 3; }; std::cout << cpt_KEvaluator << '\n'; // { dg-error "wrong number of template arguments" } return 0; }