Boost logo

Boost :

From: Gubenko, Boris (boris.gubenko_at_[hidden])
Date: 2008-08-01 16:19:51


Stefan Seefeld wrote:
> Aren't you missing a 'typename' in the above ?

Right. Thanks! In fact, it does not compile with EDG-based compilers in strict ansi mode also.

Gennadiy, will you fix the test yourself or do you want a patch?

Thanks,
  Boris

> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of Stefan Seefeld
> Sent: Friday, August 01, 2008 3:34 PM
> To: boost_at_[hidden]
> Subject: Re: [boost] [test] failure of basic_cstring_test
> with GNU libstdc++
>
> Gubenko, Boris wrote:
> > Boost.Test library test basic_cstring_test.cpp fails to compile
> > on many (all?) platforms using GNU libstdc++. Follows reproducer
> > and the results of compiling it with GNU 4.3.0 and 3.4.6.
> >
> > Replacing 'utf::basic_cstring<CharT>::size_type' with 'std::size_t'
> > in libs/test/test/basic_cstring_test.cpp makes the problem go away.
> >
> > Is it a known problem in GNU libstdc++? Does the fact that the
> > implementation does not have to provide specializations of
> > basic_string<> other than for 'char' and 'wchar_t' makes x.cpp
> > below illegal?
> >
> > Thanks,
> > Boris
> >
> > x.cpp
> > -----
> > #include <string>
> >
> > template<typename T> void foo(T) {
> > std::basic_string<T>::size_type i = 1;
> > }
> >
>
>
> Aren't you missing a 'typename' in the above ?
>
> template<typename T> void foo(T)
> {
> typename std::basic_string<T>::size_type i = 1;
> }
>
> should work.
>
> HTH,
> Stefan
>
> --
>
> ...ich hab' noch einen Koffer in Berlin...
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


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