// { dg-do compile { target c++17 } } // { dg-options "-fconcepts" } template concept Copyable = requires (T t) { T(t); }; template concept Constructable = requires { T(); }; template concept Both = Copyable && Constructable; template // requires (Copyable && ...) constexpr int f(Ts...) { return 0; } // #1 template // requires (Both && ...) constexpr int f(Ts...) { return 1; } // #2 int main() { static_assert(f(42) == 1); // { dg-error "ambiguous" } // The associated constraints of the two functions are incomparable. }