Darren New <dne### [at] san rr com> wrote:
> > If you change T.chh, then A.cpp - and any other source file that
> > includes T.chh - must be recompiled.
> And this is why Java doesn't do templates. You may not have the source
> code for A.cpp.
You mean that if the public interface of a class T changes, nevertheless
the class A which uses T doesn't need to be recompiled? How does it manage
to do that?
After all, the T.hh header might just contain the public interface for
the template code. Its implementation may be in its own compilation unit
(if the compiler supports fully the C++ standard).
--
- Warp
Post a reply to this message
|