Skip to content

Commit f2f5e36

Browse files
tautschnigDaniel Kroening
authored and
Daniel Kroening
committed
Completely remove cpp_typecheckt::check_template_restrictions
It was unused and disabled via #if 0; resurrect via git if needed.
1 parent 767a373 commit f2f5e36

File tree

2 files changed

+0
-42
lines changed

2 files changed

+0
-42
lines changed

src/cpp/cpp_typecheck.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,6 @@ class cpp_typecheckt:public c_typecheck_baset
136136
const template_typet &old_type,
137137
template_typet &new_type);
138138

139-
#if 0
140-
void check_template_restrictions(
141-
const irept &cpp_name,
142-
const irep_idt &final_identifier,
143-
const typet &final_type);
144-
#endif
145-
146139
void convert_template_declaration(cpp_declarationt &declaration);
147140

148141
void convert_non_template_declaration(cpp_declarationt &declaration);

src/cpp/cpp_typecheck_template.cpp

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -48,41 +48,6 @@ void cpp_typecheckt::salvage_default_arguments(
4848
}
4949
}
5050

51-
#if 0
52-
/*******************************************************************\
53-
54-
Function: cpp_typecheckt::check_template_restrictions
55-
56-
Inputs:
57-
58-
Outputs:
59-
60-
Purpose:
61-
62-
\*******************************************************************/
63-
64-
void cpp_typecheckt::check_template_restrictions(
65-
const irept &cpp_name,
66-
const irep_idt &final_identifier,
67-
const typet &final_type)
68-
{
69-
if(final_type.id()==ID_template)
70-
{
71-
// subtype must be class or function
72-
73-
if(final_type.subtype().id()!=ID_struct &&
74-
final_type.subtype().id()!=ID_code)
75-
{
76-
error().source_location=cpp_name.location();
77-
error() << "template only allowed with classes or functions,"
78-
<< " but got `" << to_string(final_type.subtype())
79-
<< "'" << eom;
80-
throw 0;
81-
}
82-
}
83-
}
84-
#endif
85-
8651
/*******************************************************************\
8752
8853
Function: cpp_typecheckt::typecheck_class_template

0 commit comments

Comments
 (0)