以下の例では、4を符号なしとしてキャストしないと、default.hpp(144)の '< =' signed/)私はそれに続く多くの警告が続いた。比較を行うときに、警告を避けるために符号なしをキャストする必要があります
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix_operator.hpp>
#include <string>
namespace qi = boost::spirit::qi;
typedef std::wstring::const_iterator it_type;
int main()
{
using qi::_1;
using boost::spirit::_pass;
std::wstring testChar(L"450");
auto f = testChar.begin(), l = testChar.end();
unsigned pVal[2] = {0, 0};
qi::uint_parser<unsigned, 10, 1, 1> uint1_p;
bool retVal = qi::parse(f, l, uint1_p[_pass = _1 <= (unsigned)4] >> qi::uint_, pVal[0], pVal[1]);
return 0;
}
この場合、常にキャストするのが一番ですか?
建物のブースト1.61.0