Topic: Template specialization syntax


Author: "Jonathan H Lundquist" <fluxsmith@fluxsmith.com>
Date: 1999/02/26
Raw View
Below is what I think is an explicit template member function
specialization, *not* an explicit instantiation request.  If placed in the
template header file and compiled with MSVC the linker complains about the
symbol being duplicated in each object module.  I had to add the 'inline' to
get the linker to merge them.

My question is, have I found yet another MSVC bug, or is my syntax
incorrect?

template<>
#if _MSC_VER <= 1200
inline
#endif
size_t bitset_one<unsigned __int64>::count() const throw()
{
   return 0;    // not the real implementation
}
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]