duplicate instantiations
Jaroslav Hajek
highegg at gmail.com
Tue Jun 2 06:54:18 CDT 2009
hi Michael,
I noticed that as part of 9237:3c1762c7e787, you added lines like
template class OCTAVE_API DiagArray2<Complex>::Proxy;
to Array-*.cc. While this is accepted by GCC, it gets rejected by
Intel C++, griping about duplicate instantiation.
I've asked for advice on comp.lang.c++, but after a quick
investigation it seems to me that Intel is right here. An explicit
instantiation of a class instantiates all its non-template members,
including member classes, which causes a duplicate explicit
instantiation.
I assume the OCTAVE_API decoration does not automatically apply to
member classes? Is there a different way to do this with MSVC?
I'm not really much fond about the whole DiagArray2::Proxy stuff, but
I wouldn't like to remove it now. OTOH, I wouldn't like to keep code
needed only for MSVC (and fooling other commercial compilers) which is
actually incorrect C++.
regards
--
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
More information about the Octave-maintainers
mailing list