diff --git a/include/boost/regex/config.hpp b/include/boost/regex/config.hpp index 1288f3c3..4fd1fd94 100644 --- a/include/boost/regex/config.hpp +++ b/include/boost/regex/config.hpp @@ -298,10 +298,16 @@ /* use C++ locale when targeting windows store */ #if BOOST_PLAT_WINDOWS_RUNTIME # define BOOST_REGEX_USE_CPP_LOCALE +# define BOOST_REGEX_NO_WIN32_LOCALE #endif /* Win32 defaults to native Win32 locale: */ -#if defined(_WIN32) && !defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(BOOST_REGEX_USE_C_LOCALE) && !defined(BOOST_REGEX_USE_CPP_LOCALE) && !defined(BOOST_REGEX_NO_W32) +#if defined(_WIN32) && \ + !defined(BOOST_REGEX_USE_WIN32_LOCALE) && \ + !defined(BOOST_REGEX_USE_C_LOCALE) && \ + !defined(BOOST_REGEX_USE_CPP_LOCALE) && \ + !defined(BOOST_REGEX_NO_W32) && \ + !defined(BOOST_REGEX_NO_WIN32_LOCALE) # define BOOST_REGEX_USE_WIN32_LOCALE #endif /* otherwise use C++ locale if supported: */ diff --git a/include/boost/regex/v4/w32_regex_traits.hpp b/include/boost/regex/v4/w32_regex_traits.hpp index 4a799526..560cc217 100644 --- a/include/boost/regex/v4/w32_regex_traits.hpp +++ b/include/boost/regex/v4/w32_regex_traits.hpp @@ -19,6 +19,8 @@ #ifndef BOOST_W32_REGEX_TRAITS_HPP_INCLUDED #define BOOST_W32_REGEX_TRAITS_HPP_INCLUDED +#ifndef BOOST_REGEX_NO_WIN32_LOCALE + #ifndef BOOST_RE_PAT_EXCEPT_HPP #include #endif @@ -736,4 +738,6 @@ static_mutex& w32_regex_traits::get_mutex_inst() #pragma warning(pop) #endif +#endif // BOOST_REGEX_NO_WIN32_LOCALE + #endif diff --git a/src/w32_regex_traits.cpp b/src/w32_regex_traits.cpp index fdf93052..0f825702 100644 --- a/src/w32_regex_traits.cpp +++ b/src/w32_regex_traits.cpp @@ -19,7 +19,7 @@ #define BOOST_REGEX_SOURCE #include -#if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32) +#if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32) && !defined(BOOST_REGEX_NO_WIN32_LOCALE) #include #include