From 03fb926d41912105a8d95f5fa701d987e4bce4b2 Mon Sep 17 00:00:00 2001 From: Nicola Musatti Date: Sun, 14 Oct 2007 17:31:56 +0000 Subject: [PATCH] Updated to support C++Builder 2007 Update 3 (bcc32 5.9.2) [SVN r40016] --- 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