C
Claudius
Hello,
in my class TopTen I need to define three constructors while only the
last one, the most general in terms of templates, should be sufficient
in my opinion:
template <typename Tnum, short Trank, bool Tcont>
TopTen<Tnum,Trank,Tcont>::TopTen( const TopTen<Tnum,Trank,Tcont> &
tten );
template <typename Tnum, short Trank, bool Tcont>
template <bool Tcont1>
TopTen<Tnum,Trank,Tcont>::TopTen( const TopTen<Tnum,Trank,Tcont1> &
tten );
template <typename Tnum, short Trank, bool Tcont>
template <typename Tnum1, bool Tcont1>
TopTen<Tnum,Trank,Tcont>::TopTen( const TopTen<Tnum1,Trank,Tcont1> &
tten );
In a testprogram all three copy-constructors are used.
When dropping the first two, however, the linker issues undefined
references.
I use g++ 3.4.4 under cygwin.
Does anyone have an idea?
Thank you very much in advance,
Claudius
in my class TopTen I need to define three constructors while only the
last one, the most general in terms of templates, should be sufficient
in my opinion:
template <typename Tnum, short Trank, bool Tcont>
TopTen<Tnum,Trank,Tcont>::TopTen( const TopTen<Tnum,Trank,Tcont> &
tten );
template <typename Tnum, short Trank, bool Tcont>
template <bool Tcont1>
TopTen<Tnum,Trank,Tcont>::TopTen( const TopTen<Tnum,Trank,Tcont1> &
tten );
template <typename Tnum, short Trank, bool Tcont>
template <typename Tnum1, bool Tcont1>
TopTen<Tnum,Trank,Tcont>::TopTen( const TopTen<Tnum1,Trank,Tcont1> &
tten );
In a testprogram all three copy-constructors are used.
When dropping the first two, however, the linker issues undefined
references.
I use g++ 3.4.4 under cygwin.
Does anyone have an idea?
Thank you very much in advance,
Claudius