blob: 826ee254c206fe7b218f773418f70985554e9182 [file] [log] [blame]
// Test that late-parsed default args have the same consteval semantics.
// { dg-do compile { target c++20 } }
consteval bool foo (bool x) { if (x) throw 1; return false; }
consteval bool bar (bool x = foo (true)) { return true; }
struct S
{
consteval static bool baz (bool x = foo (true)) { return true; }
};
constexpr bool a = bar (true);
constexpr bool b = S::baz (true);