// PR c++/66937 // { dg-do compile { target c++17 } } // { dg-options "-fconcepts" } #include namespace detail { template class Sink> struct copy_tuple_args_impl; template class Sink> struct copy_tuple_args_impl, Sink> { using type = Sink; }; } // copy_tuple_args copies the template arguments of a tuple into another template // copy_tuple_args does not care about constraints whatsoever. template class Sink> using copy_tuple_args = typename detail::copy_tuple_args_impl::type; // A concept of a column template concept Column = requires() { typename T::_name_t; }; // column_list is constrained to Column arguments template struct column_list { }; // Here are some columns struct A { using _name_t = int; }; struct B { using _name_t = int; }; int main() { using ColumnTuple = std::tuple; using ColumnList = copy_tuple_args; // This fails, but should not }