Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 14–7–3 Example errata?
#1
See 14-7-3 Example:

a function template specialization for good_tmp1 violated ODR in tmp1.cc.
Code:
// tmp1.h
template  void good_tmp1 ( ) { }

// tmp1.cc
#include "tmp1.h"
template  void good_tmp1 ( ) { }

I think function template specialization must be forward declaration in header file.
any reason for that?

Best Regards,
Minhyuk Kwon@Suresoft technologies Incs.
<t></t>
Reply
#2
You are correct, the declaration in the header file should be non-defining. This will be corrected in a Technical Corrigendum
Posted by and on behalf of
the MISRA C++ Working Group
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)