Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion include/boost/regex/v5/regex_traits_defaults.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ inline const char* get_default_error_string(regex_constants::error_type n)
"Unknown error.", /* REG_E_UNKNOWN 21 error_unknown */
};

return (n > ::boost::regex_constants::error_unknown) ? s_default_error_messages[::boost::regex_constants::error_unknown] : s_default_error_messages[n];
typedef typename std::make_unsigned<regex_constants::error_type>::type unsigned_type;
return (static_cast<unsigned_type>(n) > ::boost::regex_constants::error_unknown) ? s_default_error_messages[::boost::regex_constants::error_unknown] : s_default_error_messages[n];
}

inline regex_constants::syntax_type get_default_syntax_type(char c)
Expand Down