[v3] implement std::collate

Vladimir A Merzliakov wanderer@rsu.ru
Sat Aug 18 01:42:00 GMT 2001


After this patch my program break with error

g++ -MD -fexceptions -W -Wall -Werror  -O -Wuninitialized  -Wredundant-decls
  -pedantic  -ansi -march=athlon -mcpu=athlon -I/h
ome/wanderer/work/cpp/include -DDEBUGLOG -o
/home/wanderer/work/cpp/include/WCL/Console.o -c
/home/wanderer/work/cpp/include/W
CL/Console.cc
In file included from
/home/wanderer/pkg/gcc/include/g++/bits/std_locale.h:41,
                 from
/home/wanderer/pkg/gcc/include/g++/bits/ostream.tcc:32,
                 from
/home/wanderer/pkg/gcc/include/g++/bits/std_ostream.h:278,
                 from
/home/wanderer/pkg/gcc/include/g++/bits/std_iostream.h:40,
                 from /home/wanderer/pkg/gcc/include/g++/iostream:31,
                 from /home/wanderer/work/cpp/include/WCL/String.hcc:9,
                 from /home/wanderer/work/cpp/include/WCL/Console.cc:3:
/home/wanderer/pkg/gcc/include/g++/bits/locale_facets.tcc: In member
function
   `virtual std::basic_string<C, std::char_traits<_CharT>,
   std::allocator<_CharT> > std::collate<_CharT>::do_transform(const
_CharT*,
   const _CharT*) const':
/home/wanderer/pkg/gcc/include/g++/bits/locale_facets.tcc:1258: parse error
   before `=' token
gmake: *** [/home/wanderer/work/cpp/include/WCL/Console.o] Error 1



at line
>    string_type::size_type __newsize = __trans.size() * 2;

I think this line must be:
     typename string_type::size_type __newsize = __trans.size() * 2;
    ^^^^^^^^^^^
With this fix it build without problems.

Vladimir





More information about the Libstdc++ mailing list