@@ -30,6 +30,8 @@ def normalize(self, type_str):
3030
3131 def replace_basic_string (self , cls_name ):
3232
33+ print ("replace_basic_string START" , cls_name )
34+
3335 # Take the lists of all possible string variations
3436 # and clean them up by replacing ::std by std.
3537 str_eq = [
@@ -49,6 +51,8 @@ def replace_basic_string(self, cls_name):
4951 for lname in long_names :
5052 new_name = new_name .replace (lname , short_name )
5153
54+ print ("replace_basic_string DONE" , new_name )
55+
5256 return new_name
5357
5458 def decorated_call_prefix (self , cls_name , text , doit ):
@@ -99,10 +103,12 @@ def erase_recursive(self, cls_name):
99103 return self .no_end_const (cls_name )
100104
101105 def erase_allocator (self , cls_name , default_allocator = 'std::allocator' ):
106+ print ("erase_allocator START" , cls_name )
102107 cls_name = self .replace_basic_string (cls_name )
103108 c_name , c_args = templates .split (cls_name )
104109 if len (c_args ) != 2 :
105- return
110+ print ("erase_allocator EARLY RETURN" )
111+ return cls_name
106112 value_type = c_args [0 ]
107113 tmpl = string .Template (
108114 "$container<$value_type, $allocator<$value_type>>" )
@@ -112,8 +118,10 @@ def erase_allocator(self, cls_name, default_allocator='std::allocator'):
112118 allocator = default_allocator )
113119 if self .normalize (cls_name ) == \
114120 self .normalize (tmpl ):
121+ print ("erase_allocator NORMALIZED RETURN" )
115122 return templates .join (
116123 c_name , [self .erase_recursive (value_type )])
124+ print ("erase_allocator FINAL RETURN NONE" )
117125
118126 def erase_container (self , cls_name , default_container_name = 'std::deque' ):
119127 cls_name = self .replace_basic_string (cls_name )
@@ -525,6 +533,7 @@ def remove_defaults(self, type_or_string):
525533 name = self .class_declaration (type_or_string ).name
526534 if not self .remove_defaults_impl :
527535 return name
536+ print ("remove_defaults" , name )
528537 no_defaults = self .remove_defaults_impl (name )
529538 if not no_defaults :
530539 return name
0 commit comments