Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-05-27 09:05:39


Howard Hinnant wrote:

> > It seems that given:
> >
> > template<>
> > bool
> > basic_config_file_iterator<wchar_t>::getline(std::string& s);
> >
> > template<class charT>
> > bool
> > basic_config_file_iterator<charT>::getline(std::string& s)
> > {
> > return std::getline(*is, s);
> > }
> >
> > Metrowerks decides to use the second, unspecialized version, even for
> > basic_config_file_iterator<wchar_t>, and this surely fails to compile.

> I've sent a reduced test case to the Metrowerks front end engineer.

Thanks.

> In
> the meantime I can think of two workarounds:
>
> 1. Specialize the entire basic_config_file_iterator class on wchar_t.
> or

This might be a good idea, especially since two other compilers -- borland and
VC7 have problems with the same member function specialization.

> 2. Provide an inlined definition for the specialized member in the
> header.

Do you think that would help?

- Volodya


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk