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


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)