|
 |
Warp <war### [at] tag povray org> wrote:
> foo.cc:
> export template<typename T>
> void foo(T t) { bar(t); }
> I see how that could make some difference.
OTOH, thinking about it: There's no function named 'bar' defined anywhere
in the scope of foo.cc, so why should that even compile?
I have to admit I don't know if the C++ standard requires the environment
of the instantation of the template when compiling the template function or
not. Personally I wouldn't find it illogical if foo.cc above would cause
a compiler error because, after all, there's no 'bar()' function defined
there.
--
- Warp
Post a reply to this message
|
 |