https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108458
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Note GCC does implement consteval which allows for: static_assert([]() { if consteval { return std::vector<int>{1, 2} == get_val(std::vector<std::vector<int>>{ {1, 2}, {3, 4}}); } }()); static_assert([]() { if consteval { return std::vector<int>{1, 2} == get_val(consteval_get_data()); }}()); static_assert([]() { if consteval { return std::vector<int>{1, 2} == get_val(constexpr_get_data()); }}()); But does not implement (yet) P2564 where you don't need the if consteval part either for C++23 (see PR 107687 for the status there).