File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -412,15 +412,15 @@ def get_container_or_none(self, type_):
412
412
"declaration starts with " + self .name () + '<' )
413
413
return
414
414
415
- is_ns = isinstance ( type_ . declaration . parent , namespace . namespace_t )
416
- if is_ns and type_ . declaration . parent . name == "tr1" :
417
- # When using libstd++, some container traits are defined in
418
- # std::tr1:: . See remove_template_defaults_tester.py.
419
- # In this case the is_defined_in_xxx test needs to be done
420
- # on the parent
421
- decl = cls_declaration . parent
422
- else :
423
- decl = cls_declaration
415
+ decl = cls_declaration
416
+ if isinstance ( type_ , cpptypes . declarated_t ) :
417
+ is_ns = isinstance ( type_ . declaration . parent , namespace . namespace_t )
418
+ if is_ns and type_ . declaration . parent . name == "tr1" :
419
+ # When using libstd++, some container traits are defined in
420
+ # std::tr1:: . See remove_template_defaults_tester.py.
421
+ # In this case the is_defined_in_xxx test needs to be done
422
+ # on the parent
423
+ decl = cls_declaration . parent
424
424
425
425
for ns in std_namespaces :
426
426
if type_traits .impl_details .is_defined_in_xxx (ns , decl ):
You can’t perform that action at this time.
0 commit comments