Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
EXTERN_MEMBER_TEMPLATE.cpp
Go to the documentation of this file.
1// checking for extern template extension
2
3
25#include "config.h"
26
27// include a file containing the definition of a template
28// and an extern template directive referencing an explicit
29// instantiation of the same template in extern_template_imp.o
30#include "extern_template_imp.h"
31
32// establish a dependency on extern_template_imp.o to make sure
33// the extern_template_imp.cpp is compiled before this file
34#ifndef _RWSTD_NO_extern_template_imp
35
36// link with the object file below
37// LDOPTS = extern_template_imp.o
38
39#endif // _RWSTD_NO_extern_template_imp
40
41int main ()
42{
43 S<int> s;
44
45 // call member template functions on a specialization of
46 // a class template explicitly instantiated in one file
47 // and declared extern template in extern_template_imp.h
48 // to detect if the extern template declaration prevents
49 // the implicit instantiation of the member templates
50 // HP aCC 3 and 5 bug -- see STDCXX-270:
51 // http://issues.apache.org/jira/browse/STDCXX-270
52 return s.inline_member_template (0) + s.member_template (0);
53}
#define s
U inline_member_template(U) const