[locale] 1.48+stlport5.2.1: invalid conversion from `int' to `stlp_std::ctype_base::mask'
Hi, I tried to build boost1.48 with stlport5.2.1 (linux). I noticed such problem: libs/locale/src/posix/numeric.cpp:215: error: invalid conversion from `int' to `stlp_std::ctype_base::mask' This is simple problem like this one: enum Test { value } Test test; test|=value; //error is here I could use -fpermissive, however I think it's very intrusive. If you know other solutions let me know please. Best regards, Bogdan
----- Original Message -----
From: Bogdan Slusarczyk
To: boost-users@lists.boost.org Cc: Sent: Thursday, November 24, 2011 9:51 AM Subject: [Boost-users] [locale] 1.48+stlport5.2.1: invalid conversion from `int' to `stlp_std::ctype_base::mask' Hi, I tried to build boost1.48 with stlport5.2.1 (linux). I noticed such problem:
libs/locale/src/posix/numeric.cpp:215: error: invalid conversion from `int' to `stlp_std::ctype_base::mask'
This is simple problem like this one:
enum Test { value }
Test test; test|=value; //error is here
I could use -fpermissive, however I think it's very intrusive. If you know other solutions let me know please.
Best regards, Bogdan
Ok. It is a bug in Stlport library. C++03 17.3.2.1.2 Bitmask types defines operator |= on the mask values. And std::ctype_base::mask is defined as bitmask type (not only enum) - it should have overloads for these operators. If you want to fix this you can do following Change the line: mask r=mask(); To unsigned r=0; And at the end of the function Change *m++ = r To *m++ = static_cast<mask>(r); If it works you can make a patch with some ifdef for STLPort to workaround the problem. I'll commit it (with proper ifdef) Also what compiler do you use? Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.sf.net/ CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/>
participants (2)
-
Artyom Beilis
-
Bogdan Slusarczyk