2011-10-05 2 views
1

boost::xpressive을 사용할 때 컴파일 경고가 길어집니다. 특히 내가 sregex_compilercompile() 기능을 사용할 때. 그 원인을C++ 컴파일러는 boost :: xpressive를 사용할 때 경고 페이지를 제공합니다.

$ 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>' 

내가 프로그램에서 뭐하는 거지 : 내가 컴파일 할 때

#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; 
} 

, 나는 경고의 긴 스택을 얻을 :

은 내가 documentation과 함께이 작은 프로그램을 넣어 다음 이 경고가 나타 납니까?

편집 : 부스트 버전 1.43 및 g ++ 버전 4.2.1을 사용하고 있습니다.

+1

더 많은 Xpressive 오류가 발생하여 귀하의 부분에 오류가있는 것 같습니다. Boost의 어떤 버전을 사용하고 있습니까? –

+0

Clang을 사용해보세요. 그것은 오류가 적어도 읽을 수 있고, GCC의 목록에서 끝없는 인스턴스없이 ... – rubenvb

답변

2

부스트 1.47 및 g ++ 4.4.3은 -Wall 및 -Wextra를 사용하는 경우에도 코드에 대해 경고를 표시하지 않습니다. 가장 가능성있는 설명은 사용하고있는 부스트 버전이 오래되었다는 것입니다. 그리고 그 버전 이후로 개발자는 많은 경고를 수정했습니다.

즉, 매우 적극적인 경고 수준으로 컴파일하면 많은 양의 경고음이 여전히 많은 경고를 생성합니다.

#ifdef __GNUC__ 
#pragma GCC system_header 
#endif 

#include <boost/xpressive/xpressive.hpp> 

우리가 일반적으로 nowarnings/boost/xpressive/xpressive.hpp라는 디렉토리에이 파일을 배치하고 부스트 헤더에서 경고를 억제하기 위해 해당 파일을 포함 : 이것에 대한 우리의 해결 방법은 조금 다음과 같이 g와 "경고 억제"헤더를 ++ 사용하는 것입니다.

+0

이것은 좋은 해결 방법입니다, 감사합니다. – jules