File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -1076,13 +1076,19 @@ class VirtualBaseClass extends Class {
10761076}
10771077
10781078/**
1079- * The proxy class (where needed) associated with a template parameter, as
1080- * in the following code:
1081- * ```
1079+ * The proxy class (where needed) associated with a template parameter or a
1080+ * decltype, as in the following code:
1081+ * ```cpp
10821082 * template <typename T>
10831083 * struct S : T { // the type of this T is a proxy class
10841084 * ...
10851085 * };
1086+ *
1087+ * template <typename T>
1088+ * concept C =
1089+ * decltype(std::span{std::declval<T&>()})::extent
1090+ * != std::dynamic_extent;
1091+ * // the type of decltype(std::span{std::declval<T&>()}) is a proxy class
10861092 * ```
10871093 */
10881094class ProxyClass extends UserType {
@@ -1097,6 +1103,9 @@ class ProxyClass extends UserType {
10971103 TypeTemplateParameter getTemplateParameter ( ) {
10981104 is_proxy_class_for ( underlyingElement ( this ) , unresolveElement ( result ) )
10991105 }
1106+
1107+ /** Gets the decltype for which this is the proxy class. */
1108+ Decltype getDecltype ( ) { is_proxy_class_for ( underlyingElement ( this ) , unresolveElement ( result ) ) }
11001109}
11011110
11021111// Unpacks "array of ... of array of t" into t.
Original file line number Diff line number Diff line change @@ -847,9 +847,11 @@ class_template_argument_value(
847847 int arg_value: @expr ref
848848);
849849
850+ @user_or_decltype = @usertype | @decltype;
851+
850852is_proxy_class_for(
851853 unique int id: @usertype ref,
852- unique int templ_param_id: @usertype ref
854+ int templ_param_id: @user_or_decltype ref
853855);
854856
855857type_mentions(
You can’t perform that action at this time.
0 commit comments