@@ -191,6 +191,36 @@ struct TArg
191
191
192
192
// ----------------------------------------------------------------
193
193
194
+ // stores information pertaining to an explicit specialization of a
195
+ // member of an implicitly instantiated class template specialization.
196
+ // this structure is stored in the TemplateInfo corresponding to the
197
+ // outermost specialized template. if the explicitly specialized
198
+ // member is itself a member of a nested template, the SpecializationInfo
199
+ // which stores the arguments for the parent template will additionally
200
+ // store a pointer to the SpecializationInfo for the nested template,
201
+ // recursively. each SpecializationInfo node contains a vector of
202
+ // SymbolIDs pairs `(specialized, primary)`, where `specialized` is the
203
+ // replacement definition of `primary` for the given set of template
204
+ // arguments of its parent template(s).
205
+ struct SpecializationInfo
206
+ {
207
+ // template arguments a parent template is specialized for
208
+ std::vector<TArg> Args;
209
+
210
+ // ID of the template to which the arguments pertain
211
+ SymbolID Template;
212
+
213
+ // SpecializationInfo for nested templates which are also specialized
214
+ std::vector<SpecializationInfo> Nested;
215
+
216
+ // SymbolID pairs of any specialized members.
217
+ // the first element is the ID of the original member (i.e. member that is replaced)
218
+ // the second element is the ID of the specialized member (i.e. replacement)
219
+ std::vector<std::pair<SymbolID, SymbolID>> Members;
220
+ };
221
+
222
+ // ----------------------------------------------------------------
223
+
194
224
enum class TemplateSpecKind
195
225
{
196
226
Primary = 0 , // for bitstream
@@ -218,6 +248,10 @@ struct TemplateInfo
218
248
// for partial and explicit specializations
219
249
OptionalSymbolID Primary;
220
250
251
+ // stores information for explicit specializations of members
252
+ // of implicitly instantiated class template specializations
253
+ std::vector<SpecializationInfo> Specializations;
254
+
221
255
// KRYSTIAN NOTE: using the presence of args/params
222
256
// to determine the specialization kind *should* work.
223
257
// emphasis on should.
0 commit comments