Rule 0-1-3/0-1-4/0-1-5 and (template) class members

Moderators: david ward, misra cpp

grunwald
Posts: 12
Joined: Wed May 14, 2014 1:02 pm
Company: Axivion GmbH

Rule 0-1-3/0-1-4/0-1-5 and (template) class members

Postby grunwald » Wed Feb 01, 2017 6:11 pm


misra cpp
Posts: 145
Joined: Mon Jun 02, 2008 1:55 pm
Company: MISRA

Re: Rule 0-1-3/0-1-4/0-1-5 and (template) class members

Postby misra cpp » Mon Jul 10, 2017 10:47 am

The basic answer to all these queries is that every definition in the program must be used somewhere, or conversely, it should not be possible to remove a definition from the code and still have the program compile.

So for a template class, each member of the class must be used by at least one instantiation of the template.
Posted by and on behalf of
the MISRA C++ Working Group


Return to “6.0 Language independent issues (C++)”

Who is online

Users browsing this forum: No registered users and 1 guest