https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106758

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #3)
> Ah, but it should use the tuple(U1&&...) constructor

Oops, no, the inner tuple uses that one, but the outer tuple uses tuple(const
T&...).

Reduced:


struct tuple
{
  tuple(const float&) { }
};

void bar(tuple) {}

template <typename T>
concept test_expression = requires(T value) {
                            bar({value});
                          };

template <test_expression T>
void foo(T&&) {}

int main() {
  // The following is a valid expression that compiles in GCC and Clang.
  bar({12});

  // This concept fails in GCC (but not Clang).
  foo(12);
}


Clang and EDG accept this, GCC doesn't.

Reply via email to