String Algorithm: const_cast warning in 1.33.1
The attached patch silences the warnings below in <boost/algorithm/string/split.hpp> (c++ (GCC) 3.4.4 [FreeBSD] 20050518). roman@dagan ~/codex/argv0 1016:0 > cat test.c++ #include <boost/algorithm/string/split.hpp> int main() { return 0; } roman@dagan ~/codex/argv0 1017:0 > c++ -pedantic -Wall -Wextra -Wcast-qual -Wwrite-strings -Wctor-dtor-privacy -Wfloat-equal -Winline -Woverloaded-virtual -Wredundant-decls -Wsign-compare -I/usr/local/include test.c++ /usr/local/include/boost/range/detail/implementation_help.hpp: In function `Char* boost::range_detail::str_end(Char*) [with Char = char]': /usr/local/include/boost/range/end.hpp:98: instantiated from here /usr/local/include/boost/range/detail/implementation_help.hpp:58: warning: cast from `const char*' to `char*' discards qualifiers from pointer target type /usr/local/include/boost/range/detail/implementation_help.hpp: In function `Char* boost::range_detail::str_end(Char*) [with Char = wchar_t]': /usr/local/include/boost/range/end.hpp:103: instantiated from here /usr/local/include/boost/range/detail/implementation_help.hpp:58: warning: cast from `const wchar_t*' to `wchar_t*' discards qualifiers from pointer target type -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991
The attached patch silences the warnings below in <boost/algorithm/string/split.hpp> (c++ (GCC) 3.4.4 [FreeBSD] 20050518).
roman@dagan ~/codex/argv0 1016:0 > cat test.c++ #include <boost/algorithm/string/split.hpp>
int main() { return 0; }
roman@dagan ~/codex/argv0 1017:0 > c++ -pedantic -Wall -Wextra -Wcast-qual -Wwrite-strings -Wctor-dtor-privacy -Wfloat-equal -Winline -Woverloaded-virtual -Wredundant-decls -Wsign-compare -I/usr/local/include test.c++ /usr/local/include/boost/range/detail/implementation_help.hpp: In function `Char* boost::range_detail::str_end(Char*) [with Char = char]': /usr/local/include/boost/range/end.hpp:98: instantiated from here /usr/local/include/boost/range/detail/implementation_help.hpp:58: warning: cast from `const char*' to `char*' discards qualifiers from
Roman Neuhauser wrote: pointer target type
/usr/local/include/boost/range/detail/implementation_help.hpp: In function `Char* boost::range_detail::str_end(Char*) [with Char = wchar_t]': /usr/local/include/boost/range/end.hpp:103: instantiated from here /usr/local/include/boost/range/detail/implementation_help.hpp:58: warning: cast from `const wchar_t*' to `wchar_t*' discards qualifiers from pointer target type
That is an error in Range. Please make sure to put that in the headline. This is already fixed in CVS. Please remember to check the CVS before submitting a patch. And if it still there, generate the patch using the CVS version. Thanks -Thorsten
participants (2)
-
Roman Neuhauser
-
Thorsten Ottosen