From a862a573dfc2a15705f21af431253db4a2dd28b5 Mon Sep 17 00:00:00 2001 From: Nicola Musatti Date: Sun, 14 Oct 2007 17:53:15 +0000 Subject: [PATCH] Applied patch from Ticket #1320 [SVN r40020] --- include/boost/range/as_literal.hpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/include/boost/range/as_literal.hpp b/include/boost/range/as_literal.hpp index 0d6b946..72f0eb5 100755 --- a/include/boost/range/as_literal.hpp +++ b/include/boost/range/as_literal.hpp @@ -21,6 +21,9 @@ #include #include + +#include + #include #include @@ -104,15 +107,23 @@ namespace boost template< class Char, std::size_t sz > inline iterator_range as_literal( Char (&arr)[sz] ) { +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x590)) && __BORLANDC__ >= 0x590 + return boost::make_iterator_range( arr, arr + sz - 1 ); +#else return boost::make_iterator_range( arr, arr + sz - 1 ); +#endif } template< class Char, std::size_t sz > - inline iterator_range as_literal( const Char (&arr)[sz] ) + inline iterator_range as_literal( const Char (&arr)[sz] ) { +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x590)) && __BORLANDC__ >= 0x590 + return boost::make_iterator_range( arr, arr + sz - 1 ); +#else return boost::make_iterator_range( arr, arr + sz - 1 ); - } +#endif + } } #endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING