[gtkmm] Glib::Unicode::toupper can't be used the same way as toupper
- From: Morten Brix Pedersen <morten wtf dk>
- To: gtkmm-list gnome org
- Subject: [gtkmm] Glib::Unicode::toupper can't be used the same way as toupper
- Date: Fri, 12 Jul 2002 22:41:13 +0200
Hi,
Using std::string, I converted a string to uppercase doing this:
std::transform(str.begin(), str.end(), str.begin(), toupper);
I tried the same thing with Glib::ustring and it's toupper function:
std::transform(str.begin(), str.end(), str.begin(), Glib::Unicode::toupper);
However, gcc 3.1 fails with:
/usr/include/g++-v3-3.1/bits/stl_algo.h: In function `_OutputIter
std::transform(_InputIter, _InputIter, _OutputIter, _UnaryOperation) [with
_InputIter = Glib::ustring_Iterator<__gnu_cxx::__normal_iterator<char*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >,
_OutputIter = Glib::ustring_Iterator<__gnu_cxx::__normal_iterator<char*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >,
_UnaryOperation = gunichar (*)(unsigned int)]':
Utils.cpp:47: instantiated from here
/usr/include/g++-v3-3.1/bits/stl_algo.h:744: non-lvalue in assignment
- Morten.
--
http://wtf.dk/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]