My statement that template code has to go into a header is basically true in practice (at least it has to go there in the place where I work, in the standard library implementation and in Boost).
Even if my statement is a bit of a simplification, the point was that not only does the C++ compilation model not enforce the separation of interface and implementation into header and module, but it actually makes it hard to do, even if you are trying to be a good little programmer and follow the convention.
Show differencesHistory of post edits
#2Álvaro
Posted 11 December 2012 - 01:59 PM
My statement that template code has to go into a header is basically true in practice (at least it has to go there in the place where I work, in the standard library implementation and in Boost).
Even if my statement is a bit of a simplification, the point was that not only does the C++ compilation model not enforce the separation of interface and implementation into header and module, but it actually makes it hard even if you are trying to be a good little programmer and follow the convention.
Even if my statement is a bit of a simplification, the point was that not only does the C++ compilation model not enforce the separation of interface and implementation into header and module, but it actually makes it hard even if you are trying to be a good little programmer and follow the convention.
#1Álvaro
Posted 11 December 2012 - 01:59 PM
My statement that template code has to go into a header is basically true in practice (at least we have to in the place where I work, in the standard library implementation and in Boost).
Even if my statement is a bit of a simplification, the point was that not only does the C++ compilation model not enforce the separation of interface and implementation into header and module, but it actually makes it hard even if you are trying to be a good little programmer and follow the convention.
Even if my statement is a bit of a simplification, the point was that not only does the C++ compilation model not enforce the separation of interface and implementation into header and module, but it actually makes it hard even if you are trying to be a good little programmer and follow the convention.