Hi All,
I'm sorry if this has already been covered.
I'm trying to use iterator_range with a wchar_t.
My code is as follows:
std::wstring buttonName =L"jar:file:/C:/Program%20Files/diseMP/4.5.6/O2-LIVE/lib/client/ClientResources.jar!/branding/default/buttons/FindButtonActive.png";
bool isGraphical =false;
isGraphical =boost::algorithm::starts_with(buttonName, L"jar:file:/") && boost::algorithm::ends_with(buttonName, L".png");
boost::iterator_range range =boost::algorithm::find_last(buttonName, L"/");
I'm getting the following errors:
1>------ Build started: Project: TestApp, Configuration: Debug Win32 ------
1> TestApp.cpp
1>c:\program files (x86)\boost\boost\iterator\iterator_traits.hpp(30): error C2039: 'value_type' : is not a member of 'boost::detail::iterator_traits<Iterator>'
1> with
1> [
1> Iterator=wchar_t
1> ]
1> c:\program files (x86)\boost\boost\range\iterator_range_core.hpp(141) : see reference to class template instantiation 'boost::iterator_value<Iterator>' being compiled
1> with
1> [
1> Iterator=wchar_t
1> ]
1> c:\work\panthion studios\o2\testapp\testapp.cpp(11) : see reference to class template instantiation 'boost::iterator_range<IteratorT>' being compiled
1> with
1> [
1> IteratorT=wchar_t
1> ]
1>c:\program files (x86)\boost\boost\iterator\iterator_traits.hpp(30): error C2146: syntax error : missing ';' before identifier 'type'
1>c:\program files (x86)\boost\boost\iterator\iterator_traits.hpp(30): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\boost\boost\iterator\iterator_traits.hpp(30): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\boost\boost\range\iterator_range_core.hpp(141): error C2039: 'type' : is not a member of 'boost::iterator_value<Iterator>'
1> with
1> [
1> Iterator=wchar_t
1> ]
1>c:\program files (x86)\boost\boost\iterator\iterator_traits.hpp(49): error C2039: 'difference_type' : is not a member of 'boost::detail::iterator_traits<Iterator>'
1> with
1> [
1> Iterator=wchar_t
1> ]
1> c:\program files (x86)\boost\boost\range\iterator_range_core.hpp(145) : see reference to class template instantiation 'boost::iterator_difference<Iterator>' being compiled
1> with
1> [
1> Iterator=wchar_t
1> ]
1>c:\program files (x86)\boost\boost\iterator\iterator_traits.hpp(49): error C2146: syntax error : missing ';' before identifier 'type'
1>c:\program files (x86)\boost\boost\iterator\iterator_traits.hpp(49): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\boost\boost\iterator\iterator_traits.hpp(49): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\boost\boost\range\iterator_range_core.hpp(145): error C2039: 'type' : is not a member of 'boost::iterator_difference<Iterator>'
1> with
1> [
1> Iterator=wchar_t
1> ]
1>c:\program files (x86)\boost\boost\iterator\iterator_traits.hpp(36): error C2039: 'reference' : is not a member of 'boost::detail::iterator_traits<Iterator>'
1> with
1> [
1> Iterator=wchar_t
1> ]
1> c:\program files (x86)\boost\boost\range\iterator_range_core.hpp(159) : see reference to class template instantiation 'boost::iterator_reference<Iterator>' being compiled
1> with
1> [
1> Iterator=wchar_t
1> ]
1>c:\program files (x86)\boost\boost\iterator\iterator_traits.hpp(36): error C2146: syntax error : missing ';' before identifier 'type'
1>c:\program files (x86)\boost\boost\iterator\iterator_traits.hpp(36): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\boost\boost\iterator\iterator_traits.hpp(36): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\boost\boost\range\iterator_range_core.hpp(159): error C2039: 'type' : is not a member of 'boost::iterator_reference<Iterator>'
1> with
1> [
1> Iterator=wchar_t
1> ]
1>c:\program files (x86)\boost\boost\type_traits\is_abstract.hpp(72): error C2139: 'boost::iterator_range<IteratorT>' : an undefined class is not allowed as an argument to compiler intrinsic type trait '__is_abstract'
1> with
1> [
1> IteratorT=wchar_t
1> ]
1> c:\program files (x86)\boost\boost\type_traits\is_abstract.hpp(144) : see reference to class template instantiation 'boost::detail::is_abstract_imp<T>' being compiled
1> with
1> [
1> T=boost::iterator_range
1> ]
1> c:\program files (x86)\boost\boost\mpl\aux_\preprocessed\plain\or.hpp(51) : see reference to class template instantiation 'boost::is_abstract<T>' being compiled
1> with
1> [
1> T=boost::iterator_range
1> ]
1> c:\program files (x86)\boost\boost\mpl\if.hpp(63) : see reference to class template instantiation 'boost::mpl::or_' being compiled
1> with
1> [
1> T1=boost::is_abstract>,
1> T2=boost::is_array>
1> ]
1> c:\program files (x86)\boost\boost\range\iterator_range_core.hpp(174) : see reference to class template instantiation 'boost::mpl::if_' being compiled
1> with
1> [
1> T1=boost::mpl::or_>,boost::is_array>>,
1> T2=boost::iterator_range,
1> T3=boost::iterator_range
1> ]
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Does anyone have any clues as to why this is happening or alternatively any working example?
Help appreciated as always.
Regards
Sean.