- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在尝试使用 boost::xpressive
时收到一长串编译警告;特别是当我使用 sregex_compiler
的 compile()
函数时。
我关注了 documentation并将这个小程序放在一起:
#include <iostream>
#include <boost/xpressive/xpressive.hpp>
using namespace std;
int main (int argc, char **argv)
{
bool matchResult;
boost::xpressive::sregex_compiler compiler;
boost::xpressive::sregex re;
string str("hello world");
re = compiler.compile("hello"); // <-- this line causes warnings
matchResult = boost::xpressive::regex_search(str, re);
cout << "match result = " << matchResult << endl;
return 0;
}
当我编译时,我收到一大堆警告:
$ g++ -I /usr/local/include -o simple xpressive_simple.cc
/usr/local/include/boost/xpressive/detail/core/matcher/alternate_matcher.hpp: In instantiation of 'boost::xpressive::detail::alternate_matcher<boost::xpressive::detail::alternates_vector<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> > >':
/usr/local/include/boost/xpressive/regex_compiler.hpp:284: instantiated from 'boost::xpressive::detail::sequence<BidiIter> boost::xpressive::regex_compiler<BidiIter, RegexTraits, CompilerTraits>::parse_alternates(FwdIter&, FwdIter) [with FwdIter = const char*, BidiIter = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, RegexTraits = boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> >, CompilerTraits = boost::xpressive::compiler_traits<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> > >]'
/usr/local/include/boost/xpressive/regex_compiler.hpp:212: instantiated from 'boost::xpressive::basic_regex<BidiIter> boost::xpressive::regex_compiler<BidiIter, RegexTraits, CompilerTraits>::compile_(FwdIter, FwdIter, boost::xpressive::regex_constants::syntax_option_type, std::forward_iterator_tag) [with FwdIter = const char*, BidiIter = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, RegexTraits = boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> >, CompilerTraits = boost::xpressive::compiler_traits<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> > >]'
/usr/local/include/boost/xpressive/regex_compiler.hpp:120: instantiated from 'boost::xpressive::basic_regex<BidiIter> boost::xpressive::regex_compiler<BidiIter, RegexTraits, CompilerTraits>::compile(InputIter, InputIter, boost::xpressive::regex_constants::syntax_option_type) [with InputIter = const char*, BidiIter = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, RegexTraits = boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> >, CompilerTraits = boost::xpressive::compiler_traits<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> > >]'
/usr/local/include/boost/xpressive/regex_compiler.hpp:139: instantiated from 'boost::xpressive::basic_regex<BidiIter> boost::xpressive::regex_compiler<BidiIter, RegexTraits, CompilerTraits>::compile(const typename boost::iterator_value<Iterator>::type*, boost::xpressive::regex_constants::syntax_option_type) [with BidiIter = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, RegexTraits = boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> >, CompilerTraits = boost::xpressive::compiler_traits<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> > >]'
xpressive_simple.cc:13: instantiated from here
/usr/local/include/boost/xpressive/detail/core/matcher/alternate_matcher.hpp:88: warning: comparison between 'enum boost::xpressive::detail::alternates_vector<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::<anonymous>' and 'enum mpl_::size_t<1073741822ul>::<anonymous>'
/usr/local/include/boost/numeric/conversion/detail/meta.hpp: In instantiation of 'boost::numeric::convdetail::equal_to<mpl_::integral_c<boost::numeric::sign_mixture_enum, signed_to_unsigned>, mpl_::integral_c<boost::numeric::sign_mixture_enum, signed_to_signed> >':
/usr/local/include/boost/mpl/if.hpp:67: instantiated from 'boost::mpl::if_<boost::numeric::convdetail::equal_to<mpl_::integral_c<boost::numeric::sign_mixture_enum, signed_to_unsigned>, mpl_::integral_c<boost::numeric::sign_mixture_enum, signed_to_signed> >, boost::mpl::identity<boost::numeric::convdetail::subranged_SameSign<unsigned char, int> >, boost::mpl::eval_if<boost::numeric::convdetail::equal_to<mpl_::integral_c<boost::numeric::sign_mixture_enum, signed_to_unsigned>, mpl_::integral_c<boost::numeric::sign_mixture_enum, signed_to_unsigned> >, boost::mpl::identity<boost::numeric::convdetail::subranged_Sig2Unsig<unsigned char, int> >, boost::mpl::if_<boost::numeric::convdetail::equal_to<mpl_::integral_c<boost::numeric::sign_mixture_enum, signed_to_unsigned>, mpl_::integral_c<boost::numeric::sign_mixture_enum, unsigned_to_signed> >, boost::numeric::convdetail::subranged_Unsig2Sig<unsigned char, int>, boost::numeric::convdetail::subranged_SameSign<unsigned char, int> > > >'
/usr/local/include/boost/mpl/eval_if.hpp:37: instantiated from 'boost::mpl::eval_if<boost::numeric::convdetail::equal_to<mpl_::integral_c<boost::numeric::sign_mixture_enum, signed_to_unsigned>, mpl_::integral_c<boost::numeric::sign_mixture_enum, signed_to_signed> >, boost::mpl::identity<boost::numeric::convdetail::subranged_SameSign<unsigned char, int> >, boost::mpl::eval_if<boost::numeric::convdetail::equal_to<mpl_::integral_c<boost::numeric::sign_mixture_enum, signed_to_unsigned>, mpl_::integral_c<boost::numeric::sign_mixture_enum, signed_to_unsigned> >, boost::mpl::identity<boost::numeric::convdetail::subranged_Sig2Unsig<unsigned char, int> >, boost::mpl::if_<boost::numeric::convdetail::equal_to<mpl_::integral_c<boost::numeric::sign_mixture_enum, signed_to_unsigned>, mpl_::integral_c<boost::numeric::sign_mixture_enum, unsigned_to_signed> >, boost::numeric::convdetail::subranged_Unsig2Sig<unsigned char, int>, boost::numeric::convdetail::subranged_SameSign<unsigned char, int> > > >'
/usr/local/include/boost/numeric/conversion/detail/meta.hpp:82: instantiated from 'boost::numeric::convdetail::ct_switch4<mpl_::integral_c<boost::numeric::sign_mixture_enum, signed_to_unsigned>, mpl_::integral_c<boost::numeric::sign_mixture_enum, signed_to_signed>, mpl_::integral_c<boost::numeric::sign_mixture_enum, signed_to_unsigned>, mpl_::integral_c<boost::numeric::sign_mixture_enum, unsigned_to_signed>, boost::numeric::convdetail::subranged_SameSign<unsigned char, int>, boost::numeric::convdetail::subranged_Sig2Unsig<unsigned char, int>, boost::numeric::convdetail::subranged_Unsig2Sig<unsigned char, int>, boost::numeric::convdetail::subranged_SameSign<unsigned char, int> >'
/usr/local/include/boost/numeric/conversion/detail/sign_mixture.hpp:63: instantiated from 'boost::numeric::convdetail::for_sign_mixture<mpl_::integral_c<boost::numeric::sign_mixture_enum, signed_to_unsigned>, boost::numeric::convdetail::subranged_SameSign<unsigned char, int>, boost::numeric::convdetail::subranged_Sig2Unsig<unsigned char, int>, boost::numeric::convdetail::subranged_Unsig2Sig<unsigned char, int>, boost::numeric::convdetail::subranged_SameSign<unsigned char, int> >'
/usr/local/include/boost/numeric/conversion/detail/is_subranged.hpp:164: instantiated from 'boost::numeric::convdetail::get_subranged_Int2Int<unsigned char, int>'
/usr/local/include/boost/numeric/conversion/detail/is_subranged.hpp:186: instantiated from 'boost::numeric::convdetail::get_subranged_BuiltIn2BuiltIn<unsigned char, int>'
/usr/local/include/boost/numeric/conversion/detail/is_subranged.hpp:208: instantiated from 'boost::numeric::convdetail::get_subranged<unsigned char, int>'
/usr/local/include/boost/numeric/conversion/detail/is_subranged.hpp:227: instantiated from 'boost::numeric::convdetail::get_is_subranged<unsigned char, int>'
/usr/local/include/boost/numeric/conversion/detail/conversion_traits.hpp:37: instantiated from 'boost::numeric::convdetail::non_trivial_traits_impl<unsigned char, int>'
/usr/local/include/boost/numeric/conversion/conversion_traits.hpp:23: instantiated from 'boost::numeric::conversion_traits<unsigned char, int>'
/usr/local/include/boost/xpressive/detail/dynamic/parse_charset.hpp:85: instantiated from 'boost::xpressive::detail::escape_value<typename boost::iterator_value<Iterator>::type, typename CompilerTraits::regex_traits::char_class_type> boost::xpressive::detail::parse_escape(FwdIter&, FwdIter, CompilerTraits&) [with FwdIter = const char*, CompilerTraits = boost::xpressive::compiler_traits<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> > >]'
/usr/local/include/boost/xpressive/regex_compiler.hpp:726: instantiated from 'boost::xpressive::detail::escape_value<typename boost::iterator_value<Iterator>::type, typename RegexTraits::char_class_type> boost::xpressive::regex_compiler<BidiIter, RegexTraits, CompilerTraits>::parse_escape(FwdIter&, FwdIter) [with FwdIter = const char*, BidiIter = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, RegexTraits = boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> >, CompilerTraits = boost::xpressive::compiler_traits<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> > >]'
/usr/local/include/boost/xpressive/regex_compiler.hpp:522: instantiated from 'boost::xpressive::detail::sequence<BidiIter> boost::xpressive::regex_compiler<BidiIter, RegexTraits, CompilerTraits>::parse_atom(FwdIter&, FwdIter) [with FwdIter = const char*, BidiIter = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, RegexTraits = boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> >, CompilerTraits = boost::xpressive::compiler_traits<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> > >]'
/usr/local/include/boost/xpressive/regex_compiler.hpp:589: instantiated from 'boost::xpressive::detail::sequence<BidiIter> boost::xpressive::regex_compiler<BidiIter, RegexTraits, CompilerTraits>::parse_quant(FwdIter&, FwdIter) [with FwdIter = const char*, BidiIter = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, RegexTraits = boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> >, CompilerTraits = boost::xpressive::compiler_traits<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> > >]'
/usr/local/include/boost/xpressive/regex_compiler.hpp:622: instantiated from 'boost::xpressive::detail::sequence<BidiIter> boost::xpressive::regex_compiler<BidiIter, RegexTraits, CompilerTraits>::parse_sequence(FwdIter&, FwdIter) [with FwdIter = const char*, BidiIter = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, RegexTraits = boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> >, CompilerTraits = boost::xpressive::compiler_traits<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> > >]'
/usr/local/include/boost/xpressive/regex_compiler.hpp:281: instantiated from 'boost::xpressive::detail::sequence<BidiIter> boost::xpressive::regex_compiler<BidiIter, RegexTraits, CompilerTraits>::parse_alternates(FwdIter&, FwdIter) [with FwdIter = const char*, BidiIter = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, RegexTraits = boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> >, CompilerTraits = boost::xpressive::compiler_traits<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> > >]'
/usr/local/include/boost/xpressive/regex_compiler.hpp:212: instantiated from 'boost::xpressive::basic_regex<BidiIter> boost::xpressive::regex_compiler<BidiIter, RegexTraits, CompilerTraits>::compile_(FwdIter, FwdIter, boost::xpressive::regex_constants::syntax_option_type, std::forward_iterator_tag) [with FwdIter = const char*, BidiIter = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, RegexTraits = boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> >, CompilerTraits = boost::xpressive::compiler_traits<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> > >]'
/usr/local/include/boost/xpressive/regex_compiler.hpp:120: instantiated from 'boost::xpressive::basic_regex<BidiIter> boost::xpressive::regex_compiler<BidiIter, RegexTraits, CompilerTraits>::compile(InputIter, InputIter, boost::xpressive::regex_constants::syntax_option_type) [with InputIter = const char*, BidiIter = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, RegexTraits = boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> >, CompilerTraits = boost::xpressive::compiler_traits<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> > >]'
<snipped>
/usr/local/include/boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp:90: instantiated from 'bool boost::xpressive::detail::simple_repeat_matcher<Xpr, Greedy>::match(boost::xpressive::detail::match_state<BidiIter>&, const Next&) const [with BidiIter = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, Next = boost::xpressive::detail::matchable_ex<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, Xpr = boost::xpressive::detail::matcher_wrapper<boost::xpressive::detail::charset_matcher<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> >, mpl_::bool_<true>, boost::xpressive::detail::basic_chset<char> > >, Greedy = mpl_::bool_<true>]'
/usr/local/include/boost/xpressive/detail/dynamic/dynamic.hpp:80: instantiated from 'bool boost::xpressive::detail::dynamic_xpression<Matcher, BidiIter>::match(boost::xpressive::detail::match_state<BidiIter>&) const [with Matcher = boost::xpressive::detail::simple_repeat_matcher<boost::xpressive::detail::matcher_wrapper<boost::xpressive::detail::charset_matcher<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> >, mpl_::bool_<true>, boost::xpressive::detail::basic_chset<char> > >, mpl_::bool_<true> >, BidiIter = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]'
xpressive_simple.cc:18: instantiated from here
/usr/local/include/boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp:97: warning: comparison between 'enum boost::xpressive::detail::quant_style<quant_fixed_width, 1ul, true>::<anonymous>' and 'enum mpl_::size_t<1073741822ul>::<anonymous>'
/usr/local/include/boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp: In member function 'bool boost::xpressive::detail::simple_repeat_matcher<Xpr, Greedy>::match_(boost::xpressive::detail::match_state<BidiIter>&, const Next&, boost::xpressive::detail::greedy_slow_tag) const [with BidiIter = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, Next = boost::xpressive::detail::matchable_ex<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, Xpr = boost::xpressive::detail::matcher_wrapper<boost::xpressive::detail::charset_matcher<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> >, mpl_::bool_<false>, boost::xpressive::detail::basic_chset<char> > >, Greedy = mpl_::bool_<true>]':
/usr/local/include/boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp:90: instantiated from 'bool boost::xpressive::detail::simple_repeat_matcher<Xpr, Greedy>::match(boost::xpressive::detail::match_state<BidiIter>&, const Next&) const [with BidiIter = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, Next = boost::xpressive::detail::matchable_ex<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, Xpr = boost::xpressive::detail::matcher_wrapper<boost::xpressive::detail::charset_matcher<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> >, mpl_::bool_<false>, boost::xpressive::detail::basic_chset<char> > >, Greedy = mpl_::bool_<true>]'
/usr/local/include/boost/xpressive/detail/dynamic/dynamic.hpp:80: instantiated from 'bool boost::xpressive::detail::dynamic_xpression<Matcher, BidiIter>::match(boost::xpressive::detail::match_state<BidiIter>&) const [with Matcher = boost::xpressive::detail::simple_repeat_matcher<boost::xpressive::detail::matcher_wrapper<boost::xpressive::detail::charset_matcher<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> >, mpl_::bool_<false>, boost::xpressive::detail::basic_chset<char> > >, mpl_::bool_<true> >, BidiIter = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]'
xpressive_simple.cc:18: instantiated from here
/usr/local/include/boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp:97: warning: comparison between 'enum boost::xpressive::detail::quant_style<quant_fixed_width, 1ul, true>::<anonymous>' and 'enum mpl_::size_t<1073741822ul>::<anonymous>'
/usr/local/include/boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp: In member function 'bool boost::xpressive::detail::simple_repeat_matcher<Xpr, Greedy>::match_(boost::xpressive::detail::match_state<BidiIter>&, const Next&, boost::xpressive::detail::greedy_slow_tag) const [with BidiIter = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, Next = boost::xpressive::detail::matchable_ex<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, Xpr = boost::xpressive::detail::matcher_wrapper<boost::xpressive::detail::charset_matcher<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> >, mpl_::bool_<true>, boost::xpressive::detail::compound_charset<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> > > > >, Greedy = mpl_::bool_<true>]':
/usr/local/include/boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp:90: instantiated from 'bool boost::xpressive::detail::simple_repeat_matcher<Xpr, Greedy>::match(boost::xpressive::detail::match_state<BidiIter>&, const Next&) const [with BidiIter = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, Next = boost::xpressive::detail::matchable_ex<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, Xpr = boost::xpressive::detail::matcher_wrapper<boost::xpressive::detail::charset_matcher<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> >, mpl_::bool_<true>, boost::xpressive::detail::compound_charset<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> > > > >, Greedy = mpl_::bool_<true>]'
/usr/local/include/boost/xpressive/detail/dynamic/dynamic.hpp:80: instantiated from 'bool boost::xpressive::detail::dynamic_xpression<Matcher, BidiIter>::match(boost::xpressive::detail::match_state<BidiIter>&) const [with Matcher = boost::xpressive::detail::simple_repeat_matcher<boost::xpressive::detail::matcher_wrapper<boost::xpressive::detail::charset_matcher<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> >, mpl_::bool_<true>, boost::xpressive::detail::compound_charset<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> > > > >, mpl_::bool_<true> >, BidiIter = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]'
xpressive_simple.cc:18: instantiated from here
/usr/local/include/boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp:97: warning: comparison between 'enum boost::xpressive::detail::quant_style<quant_fixed_width, 1ul, true>::<anonymous>' and 'enum mpl_::size_t<1073741822ul>::<anonymous>'
/usr/local/include/boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp: In member function 'bool boost::xpressive::detail::simple_repeat_matcher<Xpr, Greedy>::match_(boost::xpressive::detail::match_state<BidiIter>&, const Next&, boost::xpressive::detail::greedy_slow_tag) const [with BidiIter = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, Next = boost::xpressive::detail::matchable_ex<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, Xpr = boost::xpressive::detail::matcher_wrapper<boost::xpressive::detail::charset_matcher<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> >, mpl_::bool_<false>, boost::xpressive::detail::compound_charset<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> > > > >, Greedy = mpl_::bool_<true>]':
/usr/local/include/boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp:90: instantiated from 'bool boost::xpressive::detail::simple_repeat_matcher<Xpr, Greedy>::match(boost::xpressive::detail::match_state<BidiIter>&, const Next&) const [with BidiIter = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, Next = boost::xpressive::detail::matchable_ex<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, Xpr = boost::xpressive::detail::matcher_wrapper<boost::xpressive::detail::charset_matcher<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> >, mpl_::bool_<false>, boost::xpressive::detail::compound_charset<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> > > > >, Greedy = mpl_::bool_<true>]'
/usr/local/include/boost/xpressive/detail/dynamic/dynamic.hpp:80: instantiated from 'bool boost::xpressive::detail::dynamic_xpression<Matcher, BidiIter>::match(boost::xpressive::detail::match_state<BidiIter>&) const [with Matcher = boost::xpressive::detail::simple_repeat_matcher<boost::xpressive::detail::matcher_wrapper<boost::xpressive::detail::charset_matcher<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> >, mpl_::bool_<false>, boost::xpressive::detail::compound_charset<boost::xpressive::regex_traits<char, boost::xpressive::cpp_regex_traits<char> > > > >, mpl_::bool_<true> >, BidiIter = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]'
xpressive_simple.cc:18: instantiated from here
/usr/local/include/boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp:97: warning: comparison between 'enum boost::xpressive::detail::quant_style<quant_fixed_width, 1ul, true>::<anonymous>' and 'enum mpl_::size_t<1073741822ul>::<anonymous>'
我在导致出现这些警告的程序中做了什么?
编辑:我使用的是 boost 版本 1.43 和 g++ 版本 4.2.1。
最佳答案
Boost 1.47 和 g++ 4.4.3 不会对您的代码发出任何警告,即使使用 -Wall 和 -Wextra。最可能的解释是您使用的 boost 版本较旧,并且自该版本发布以来,xpressive 开发人员修复了许多警告。
就是说,如果您(像我们一样)使用极其激进的警告级别进行编译,大量的 boost 仍然会产生很多警告。我们的解决方法是使用 g++ 的“警告抑制” header ,看起来有点像这样:
#ifdef __GNUC__
#pragma GCC system_header
#endif
#include <boost/xpressive/xpressive.hpp>
我们通常将此文件放在名为 nowarnings/boost/xpressive/xpressive.hpp
的目录中,并包含该文件以抑制来自 boost header 的警告。
关于C++ 编译器在使用 boost::xpressive 时给出警告页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7657269/
我正在尝试使用boost.spirit的qi库解析某些内容,而我遇到了一个问题。根据spirit docs,a >> b应该产生类型为tuple的东西。但这是boost::tuple(又名 fusio
似乎有/正在努力做到这一点,但到目前为止我看到的大多数资源要么已经过时(带有死链接),要么几乎没有信息来实际构建一个小的工作样本(例如,依赖于boost program_options 以构建可执行文
我对 Boost.Log 的状态有点困惑。这是 Boost 的官方部分,还是尚未被接受?当我用谷歌搜索时,我看到一些帖子谈论它在 2010 年是如何被接受的,等等,但是当我查看最后一个 Boost 库
Boost 提供了两种不同的实现 string_view ,这将成为 C++17 的一部分: boost::string_ref在 utility/string_ref.hpp boost::stri
最近,我被一家GIS公司雇用来重写他们的旧地理信息库。所以我目前正在寻找一个好的计算几何库。我看过CGAL,这真是了不起,但是我的老板想要免费的东西。 所以我现在正在检查Boost.Geometry。
假设我有一个无向图 G。假设我添加以下内容 add_edge(1,2,G); add_edge(1,3,G); add_edge(0,2,G); 现在我再说一遍: add_edge(0,2,G); 我
我使用 CMake 来查找 Boost。找到了 Boost,但 CMake 出错了 Imported targets not available for Boost version 请参阅下面的完整错
我是 boost::fusion 和 boost::mpl 库的新手。谁能告诉我这两个库之间的主要区别? 到目前为止,我只使用 fusion::vector 和其他一些简单的东西。现在我想使用 fus
这个问题已经有答案了: 已关闭10 年前。 Possible Duplicate: What are the benefits of using Boost.Phoenix? 所以我开始阅读 boos
我正在尝试获得一个使用 Boost.Timer 的简单示例,用于一些秒表性能测量,但我不明白为什么我无法成功地将 Boost.Timer 链接到 Boost.Chrono。我使用以下简单脚本从源代码构
我有这样的东西: enum EFood{ eMeat, eFruit }; class Food{ }; class Meat: public Food{ void someM
有人可以告诉我,我如何获得boost::Variant处理无序地图? typedef boost::variant lut_value;unordered_map table; 我认为有一个用于boo
我对 Boost.Geometry 中的环和多边形感到困惑。 在文档中,没有图形显示什么是环,什么是多边形。 谁能画图解释两个概念的区别? 最佳答案 在 Boost.Geometry 中,多边形被定义
我正在使用 boost.pool,但我不知道何时使用 boost::pool<>::malloc和 boost::pool<>::ordered_malloc ? 所以, boost::pool<>:
我正在尝试通过 *boost::fast_pool_allocator* 使用 *boost::container::flat_set*。但是,我收到编译错误。非常感谢您的意见和建议。为了突出这个问题
sau_timer::sau_timer(int secs, timerparam f) : strnd(io), t(io, boost::posix_time::seconds(secs)
我无法理解此功能的文档,我已多次看到以下内容 tie (ei,ei_end) = out_edges(*(vi+a),g); **g**::out_edge_iterator ei, ei_end;
我想在 C++ 中序列化分层数据结构。我正在处理的项目使用 boost,所以我使用 boost::property_tree::ptree 作为我的数据节点结构。 我们有像 Person 这样的高级结
我需要一些帮助来解决这个异常,我正在实现一个 NPAPI 插件,以便能够使用来自浏览器扩展的本地套接字,为此我正在使用 Firebreath 框架。 对于套接字和连接,我使用带有异步调用的 Boost
我尝试将 boost::bind 与 boost::factory 结合使用但没有成功 我有这个类 Zambas 有 4 个参数(2 个字符串和 2 个整数)和 class Zambas { publ
我是一名优秀的程序员,十分优秀!