File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -691,8 +691,28 @@ typedefbase(
691691 int type_id: @type ref
692692);
693693
694+ /**
695+ * An instance of the C++11 `decltype` operator. For example:
696+ * ```
697+ * int a;
698+ * decltype(1+a) b;
699+ * ```
700+ * Here `expr` is `1+a`.
701+ *
702+ * Sometimes an additional pair of parentheses around the expression
703+ * would change the semantics of this decltype, e.g.
704+ * ```
705+ * struct A { double x; };
706+ * const A* a = new A();
707+ * decltype( a->x ); // type is double
708+ * decltype((a->x)); // type is const double&
709+ * ```
710+ * (Please consult the C++11 standard for more details).
711+ * `parentheses_would_change_meaning` is `true` iff that is the case.
712+ */
713+ #keyset[id, expr]
694714decltypes(
695- unique int id: @decltype,
715+ int id: @decltype,
696716 int expr: @expr ref,
697717 int base_type: @type ref,
698718 boolean parentheses_would_change_meaning: boolean ref
You can’t perform that action at this time.
0 commit comments