case META_TYPE:
/* No additional data. */
break;
+
+ case SPLICE_SCOPE:
+ if (streaming_p ())
+ u (SPLICE_SCOPE_TYPE_P (type));
+ tree_node (SPLICE_SCOPE_EXPR (type));
+ break;
}
tree_node (TYPE_ATTRIBUTES (type));
if (!get_overrun ())
res = meta_info_type_node;
break;
+
+ case SPLICE_SCOPE:
+ {
+ bool type = u ();
+ tree expr = tree_node ();
+
+ if (!get_overrun ())
+ res = make_splice_scope (expr, type);
+ }
+ break;
}
/* In the exporting TU, a derived type with attributes was built by
--- /dev/null
+// { dg-do compile { target c++26 } }
+// { dg-additional-options "-fmodules -freflection" }
+
+export module exporting_splice_scope;
+// { dg-module-cmi exporting_splice_scope }
+
+export template <typename T>
+using dependent_splice_type = typename [: ^^T :];
+
+export template <bool Cond, typename T, typename U>
+using somehow_more_complicated_dependent_splice_type =
+ typename [: Cond ? ^^T : ^^U :];
--- /dev/null
+// { dg-do compile { target c++26 } }
+// { dg-additional-options "-fmodules -freflection" }
+
+import exporting_splice_scope;
+
+#include <meta>
+
+int
+main ()
+{
+ static_assert (std::meta::dealias (^^dependent_splice_type<int>) == ^^int);
+ static_assert (std::meta::dealias (
+ ^^somehow_more_complicated_dependent_splice_type<true, int, double>) == ^^int);
+ static_assert (std::meta::dealias (
+ ^^somehow_more_complicated_dependent_splice_type<false, int, double>) == ^^double);
+}