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.
This commit is contained in:
Andrey Semashev
2017-03-25 20:34:56 +03:00
committed by GitHub
parent 22aedd996c
commit f89c75f7b0

View File

@ -43,8 +43,8 @@ namespace BOOST_REGEX_DETAIL_NS{
template <class charT>
struct digraph : public std::pair<charT, charT>
{
digraph() : std::pair<charT, charT>(0, 0){}
digraph(charT c1) : std::pair<charT, charT>(c1, 0){}
digraph() : std::pair<charT, charT>(charT(0), charT(0)){}
digraph(charT c1) : std::pair<charT, charT>(c1, charT(0)){}
digraph(charT c1, charT c2) : std::pair<charT, charT>(c1, c2)
{}
digraph(const digraph<charT>& d) : std::pair<charT, charT>(d.first, d.second){}