don't check number of arguments for partial template specialisation
git-svn-id: svn+ssh://svn.cprover.org/srv/svn/cbmc/trunk@4535 6afb6bc1-c8e4-404c-8f48-9ae832c5b171
This commit is contained in:
parent
ce9b8c459c
commit
21e7b5bcf6
|
@ -14,3 +14,6 @@ template<>
|
|||
struct p<long double>
|
||||
{ typedef long double type; };
|
||||
|
||||
int main()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
KNOWNBUG
|
||||
CORE
|
||||
main.cpp
|
||||
|
||||
^EXIT=0$
|
||||
^SIGNAL=0$
|
||||
--
|
||||
^warning: ignoring
|
||||
|
||||
|
|
|
@ -5,4 +5,3 @@ main.ii
|
|||
^SIGNAL=0$
|
||||
--
|
||||
^warning: ignoring
|
||||
|
||||
|
|
|
@ -698,19 +698,10 @@ void cpp_typecheckt::convert_class_template_specialization(
|
|||
#endif
|
||||
|
||||
{
|
||||
// partial -- we typecheck
|
||||
// partial specialization -- we typecheck
|
||||
declaration.partial_specialization_args()=template_args_non_tc;
|
||||
declaration.set_specialization_of(template_symbol.name);
|
||||
|
||||
// We can't typecheck arguments yet, they are used
|
||||
// for guessing later. But we can check the number.
|
||||
if(template_args_non_tc.arguments().size()!=
|
||||
to_cpp_declaration(template_symbol.type).template_type().template_parameters().size())
|
||||
{
|
||||
err_location(cpp_name.location());
|
||||
throw "template specialization with wrong number of arguments";
|
||||
}
|
||||
|
||||
typecheck_class_template(declaration);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue