From f89c75f7b0b8ad9d8d204c365444c2612b88b6fe Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Sat, 25 Mar 2017 20:34:56 +0300 Subject: [PATCH] Silence MSVC 14.1 warnings of narrowing conversion In debug mode the compiler is not able to see that the int constant can fit in the character type without loss. --- include/boost/regex/v4/basic_regex_creator.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/regex/v4/basic_regex_creator.hpp b/include/boost/regex/v4/basic_regex_creator.hpp index 132ff84f0..623e06f16 100644 --- a/include/boost/regex/v4/basic_regex_creator.hpp +++ b/include/boost/regex/v4/basic_regex_creator.hpp @@ -43,8 +43,8 @@ namespace BOOST_REGEX_DETAIL_NS{ template struct digraph : public std::pair { - digraph() : std::pair(0, 0){} - digraph(charT c1) : std::pair(c1, 0){} + digraph() : std::pair(charT(0), charT(0)){} + digraph(charT c1) : std::pair(c1, charT(0)){} digraph(charT c1, charT c2) : std::pair(c1, c2) {} digraph(const digraph& d) : std::pair(d.first, d.second){}