diff -Naur .build/boost_1_53_0/boost/utility/string_ref.hpp .build/boost_1_53_0_patched/boost/utility/string_ref.hpp
|
old
|
new
|
|
| 17 | 17 | |
| 18 | 18 | #include <boost/config.hpp> |
| 19 | 19 | #include <boost/detail/workaround.hpp> |
| | 20 | #include <boost/throw_exception.hpp> |
| 20 | 21 | |
| 21 | 22 | #include <stdexcept> |
| 22 | 23 | #include <algorithm> |
| … |
… |
|
| 115 | 116 | |
| 116 | 117 | const charT& at(size_t pos) const { |
| 117 | 118 | if ( pos >= len_ ) |
| 118 | | throw std::out_of_range ( "boost::string_ref::at" ); |
| | 119 | throw_exception( std::out_of_range ( "boost::string_ref::at" ) ); |
| 119 | 120 | return ptr_[pos]; |
| 120 | 121 | } |
| 121 | 122 | |
| … |
… |
|
| 145 | 146 | #if BOOST_WORKAROUND(BOOST_MSVC, <= 1600) |
| 146 | 147 | // Looks like msvc 8 and 9 have a codegen bug when one branch of |
| 147 | 148 | // a conditional operator is a throw expression. -EAN 2012/12/04 |
| 148 | | if ( pos > size()) throw std::out_of_range ( "string_ref::substr" ); |
| | 149 | if ( pos > size()) throw_exception( std::out_of_range ( "string_ref::substr" ) ); |
| 149 | 150 | if ( n == npos || pos + n > size()) n = size () - pos; |
| 150 | 151 | return basic_string_ref ( data() + pos, n ); |
| 151 | 152 | #else |
| 152 | | return pos > size() ? throw std::out_of_range ( "string_ref::substr" ) : |
| | 153 | return pos > size() ? throw_exception( std::out_of_range ( "string_ref::substr" ) ) : |
| 153 | 154 | basic_string_ref ( data() + pos, n == npos || pos + n > size() ? size() - pos : n ); |
| 154 | 155 | #endif |
| 155 | 156 | } |