diff --git a/src/c_regex_traits.cpp b/src/c_regex_traits.cpp index a5645410..d4aaca59 100644 --- a/src/c_regex_traits.cpp +++ b/src/c_regex_traits.cpp @@ -22,6 +22,12 @@ #define BOOST_REGEX_SOURCE +#include + +# ifdef BOOST_MSVC +# pragma warning(disable: 4702) +# endif + #include #include #include @@ -160,6 +166,8 @@ enum syntax_map_size map_size = UCHAR_MAX + 1 }; +std::size_t BOOST_REGEX_CALL _re_get_message(char* buf, std::size_t len, std::size_t id); + #ifndef BOOST_NO_WREGEX BOOST_REGEX_DECL wchar_t re_zero_w; @@ -176,13 +184,7 @@ struct syntax_map_t std::list* syntax; -#endif - - -std::size_t BOOST_REGEX_CALL _re_get_message(char* buf, std::size_t len, std::size_t id); - -template -std::size_t BOOST_REGEX_CALL re_get_message(charT* buf, std::size_t len, std::size_t id) +std::size_t BOOST_REGEX_CALL re_get_message(wchar_t* buf, std::size_t len, std::size_t id) { std::size_t size = _re_get_message(static_cast(0), 0, id); if(len < size) @@ -192,6 +194,7 @@ std::size_t BOOST_REGEX_CALL re_get_message(charT* buf, std::size_t len, std::si size = boost::c_regex_traits::strwiden(buf, len, cb.get()); return size; } +#endif inline std::size_t BOOST_REGEX_CALL re_get_message(char* buf, std::size_t len, std::size_t id) { diff --git a/src/cpp_regex_traits.cpp b/src/cpp_regex_traits.cpp index 047ed6a2..eff1999c 100644 --- a/src/cpp_regex_traits.cpp +++ b/src/cpp_regex_traits.cpp @@ -27,6 +27,10 @@ #ifndef BOOST_NO_STD_LOCALE +# ifdef BOOST_MSVC +# pragma warning(disable:4786 4702 4127 4244) +# endif + #include #include #include @@ -39,9 +43,8 @@ #include #include "primary_transform.hpp" - # ifdef BOOST_MSVC -# pragma warning(disable:4786) +# pragma warning(disable:4786 4702 4127 4244) # endif namespace{