diff --git a/include/boost/range/begin.hpp b/include/boost/range/begin.hpp index eb2d9b7..9812f71 100755 --- a/include/boost/range/begin.hpp +++ b/include/boost/range/begin.hpp @@ -84,7 +84,8 @@ namespace range_detail // string ////////////////////////////////////////////////////////////////////// -#if BOOST_WORKAROUND(__MWERKS__, <= 0x3204 ) // up to 9.3 +#if BOOST_WORKAROUND(__MWERKS__, <= 0x3204 ) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +// CW up to 9.3 and borland have troubles with function ordering inline const char* begin( const char* s ) { return s; diff --git a/include/boost/range/end.hpp b/include/boost/range/end.hpp index 02ed4f6..6c5ef68 100755 --- a/include/boost/range/end.hpp +++ b/include/boost/range/end.hpp @@ -84,7 +84,8 @@ namespace range_detail // string ////////////////////////////////////////////////////////////////////// -#if BOOST_WORKAROUND(__MWERKS__, <= 0x3204 ) // up to 9.3 +#if BOOST_WORKAROUND(__MWERKS__, <= 0x3204 ) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +// CW up to 9.3 and borland have troubles with function ordering inline char* end( char* s ) { return range_detail::str_end( s ); diff --git a/include/boost/range/size.hpp b/include/boost/range/size.hpp index fc5fa1e..f01af3a 100755 --- a/include/boost/range/size.hpp +++ b/include/boost/range/size.hpp @@ -92,20 +92,21 @@ inline BOOST_DEDUCED_TYPENAME range_size::type size( const T& r ) } -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) -// BCB is not able to overload pointer when class overloads are also available -template<> -inline range_size::type size( const char*& r ) -{ +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +// BCB is not able to overload pointer when class overloads are also +available. +inline range_size::type size( const char* r ) { return range_detail::str_size( r ); } - -template<> -inline range_size::type size( const wchar_t*& r ) -{ +inline range_size::type size( char* r ) { + return range_detail::str_size( r ); +} +inline range_size::type size( const wchar_t* r ) { + return range_detail::str_size( r ); +} +inline range_size::type size( wchar_t* r ) { return range_detail::str_size( r ); } - #endif