From 6eb35e2cf19315901ce5b1babd2b4da5e5b05f73 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 11 Jul 2008 18:00:15 +0000 Subject: [PATCH] Fixes #2097. [SVN r47319] --- include/boost/regex/v4/cpp_regex_traits.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/boost/regex/v4/cpp_regex_traits.hpp b/include/boost/regex/v4/cpp_regex_traits.hpp index ddcbef43..58c82540 100644 --- a/include/boost/regex/v4/cpp_regex_traits.hpp +++ b/include/boost/regex/v4/cpp_regex_traits.hpp @@ -293,7 +293,9 @@ void cpp_regex_traits_char_layer::init() // if((int)cat >= 0) { +#ifndef BOOST_NO_EXCEPTIONS try{ +#endif for(regex_constants::syntax_type i = 1; i < regex_constants::syntax_max; ++i) { string_type mss = this->m_pmessages->get(cat, 0, i, get_default_message(i)); @@ -303,12 +305,14 @@ void cpp_regex_traits_char_layer::init() } } this->m_pmessages->close(cat); +#ifndef BOOST_NO_EXCEPTIONS } catch(...) { this->m_pmessages->close(cat); throw; } +#endif } else { @@ -1055,3 +1059,4 @@ static_mutex& cpp_regex_traits::get_mutex_inst() #endif +