Handle StructuralValue-type template arguments in define_aggregate.

Fixes #159.
This commit is contained in:
Dan Katz
2025-06-25 10:30:22 -04:00
parent e5f36c85d0
commit 9bcfc343cb
2 changed files with 36 additions and 2 deletions

View File

@@ -396,4 +396,31 @@ int_holder_template<int_holder{0}> o2;
} // namespace bb_clang_p2996_issue_145_regression_test
// ========================================
// bb_clang_p2996_issue_159_regression_test
// ========================================
namespace bb_clang_p2996_issue_159_regression_test {
template <auto V>
struct VS;
template <>
struct VS<^^float>{};
consteval {
std::meta::define_aggregate(^^VS<0>, {});
std::meta::define_aggregate(
std::meta::substitute(^^VS, {std::meta::reflect_constant(1)}), {});
std::meta::define_aggregate(
std::meta::substitute(^^VS, {std::meta::reflect_constant(^^int)}),
{});
}
VS<1> v1;
VS<^^int> v2;
} // namespace bb_clang_p2996_issue_159_regression_test
int main() { }