Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
IMPLICIT_INSTANTIATION.cpp
Go to the documentation of this file.
1// checking for implicit instantiation
2
3
25#include "config.h"
26
27#ifndef _RWSTD_NO_EXPLICIT_INSTANTIATION
28 // establish a dependency
29 // LDOPTS = EXPLICIT_INSTANTIATION.o
30#endif // _RWSTD_NO_EXPLICIT_INSTANTIATION
31
32
33// int foo<int>(int) implicitly instantiated in EXPLICIT_INSTANTIATION.cpp
34// via an explicit instantiation directive instantiating another template
35// that references foo<int>(int)
36
37template <class T>
38T foo (T); // declared, not defined
39
40
41int main ()
42{
43 // test determines whether a template implicitly instantiated
44 // in one translation unit via an explicit instantiation
45 // directiveinstantiating another template that references
46 // the former is made available to other translation units
47 return foo (0);
48}
#define T
Definition 17.names.cpp:163
#define foo(buf, s,...)