// PR c++/99885 // { dg-do compile { target c++17 } } template struct Foo {}; template struct Bar { constexpr auto foo() const -> Foo { return {}; } }; constexpr int a = 1; constexpr Bar bar; Foo foo = bar.foo(); // <-- CTAD failure