From 9d0e60bd74ac50a69a0c41b5fd06f1eaf31ce069 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 13 Dec 2005 17:24:28 +0000 Subject: [PATCH] Change assert into runtime check - it keeps the VC8 analyser happy. [SVN r32013] --- include/boost/regex/v4/w32_regex_traits.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/boost/regex/v4/w32_regex_traits.hpp b/include/boost/regex/v4/w32_regex_traits.hpp index 0d3d6ce3..192cb535 100644 --- a/include/boost/regex/v4/w32_regex_traits.hpp +++ b/include/boost/regex/v4/w32_regex_traits.hpp @@ -533,8 +533,9 @@ typename w32_regex_traits_implementation::char_class_type return pos->second; } std::size_t id = 1 + re_detail::get_default_class_id(p1, p2); - BOOST_ASSERT(id < sizeof(masks) / sizeof(masks[0])); - return masks[id]; + if(id < sizeof(masks) / sizeof(masks[0])) + return masks[id]; + return masks[0]; }