//test.cpp #include #include #include #include using namespace boost::spirit::qi; int main(){ std::cout< fileContents; phrase_parse( str.begin(),str.end(), double_ % ',', space , fileContents ); for(std::size_t j = 0; j != 9; ++j) std::cout<::parse(Iterator&, const Iterator&, Attribute&, const RealPolicies&) [with Iterator = __gnu_cxx::__normal_iterator >; Attribute = double; T = double; RealPolicies = boost::spirit::qi::real_policies]' /home/ulfi/include/boost/spirit/home/qi/numeric/real.hpp:168:34: required from 'bool boost::spirit::qi::any_real_parser::parse(Iterator&, const Iterator&, Context&, const Skipper&, T&) const [with Iterator = __gnu_cxx::__normal_iterator >; Context = boost::spirit::context&, boost::fusion::nil_>, boost::spirit::locals<> >; Skipper = boost::spirit::qi::char_class >; T = double; RealPolicies = boost::spirit::qi::real_policies]' /home/ulfi/include/boost/spirit/home/qi/detail/fail_function.hpp:38:20: required from 'bool boost::spirit::qi::detail::fail_function::operator()(const Component&, Attribute&) const [with Component = boost::spirit::qi::any_real_parser >; Attribute = double; Iterator = __gnu_cxx::__normal_iterator >; Context = boost::spirit::context&, boost::fusion::nil_>, boost::spirit::locals<> >; Skipper = boost::spirit::qi::char_class >]' /home/ulfi/include/boost/spirit/home/qi/detail/pass_container.hpp:283:38: required from 'bool boost::spirit::qi::detail::pass_container::dispatch_container(const Component&, mpl_::false_) const [with Component = boost::spirit::qi::any_real_parser >; F = boost::spirit::qi::detail::fail_function<__gnu_cxx::__normal_iterator >, boost::spirit::context&, boost::fusion::nil_>, boost::spirit::locals<> >, boost::spirit::qi::char_class > >; Attr = std::vector; Sequence = mpl_::bool_; mpl_::false_ = mpl_::bool_]' /home/ulfi/include/boost/spirit/home/qi/detail/pass_container.hpp:331:38: required from 'bool boost::spirit::qi::detail::pass_container::dispatch_attribute(const Component&, mpl_::true_) const [with Component = boost::spirit::qi::any_real_parser >; F = boost::spirit::qi::detail::fail_function<__gnu_cxx::__normal_iterator >, boost::spirit::context&, boost::fusion::nil_>, boost::spirit::locals<> >, boost::spirit::qi::char_class > >; Attr = std::vector; Sequence = mpl_::bool_; mpl_::true_ = mpl_::bool_]' /home/ulfi/include/boost/spirit/home/qi/detail/pass_container.hpp:351:38: required from 'bool boost::spirit::qi::detail::pass_container::operator()(const Component&) const [with Component = boost::spirit::qi::any_real_parser >; F = boost::spirit::qi::detail::fail_function<__gnu_cxx::__normal_iterator >, boost::spirit::context&, boost::fusion::nil_>, boost::spirit::locals<> >, boost::spirit::qi::char_class > >; Attr = std::vector; Sequence = mpl_::bool_]' /home/ulfi/include/boost/spirit/home/qi/operator/list.hpp:65:19: required from 'bool boost::spirit::qi::list::parse_container(F) const [with F = boost::spirit::qi::detail::pass_container >, boost::spirit::context&, boost::fusion::nil_>, boost::spirit::locals<> >, boost::spirit::qi::char_class > >, std::vector, mpl_::bool_ >; Left = boost::spirit::qi::any_real_parser >; Right = boost::spirit::qi::literal_char]' /home/ulfi/include/boost/spirit/home/qi/operator/list.hpp:93:33: required from 'bool boost::spirit::qi::list::parse(Iterator&, const Iterator&, Context&, const Skipper&, Attribute&) const [with Iterator = __gnu_cxx::__normal_iterator >; Context = boost::spirit::context&, boost::fusion::nil_>, boost::spirit::locals<> >; Skipper = boost::spirit::qi::char_class >; Attribute = std::vector; Left = boost::spirit::qi::any_real_parser >; Right = boost::spirit::qi::literal_char]' /home/ulfi/include/boost/spirit/home/qi/parse.hpp:164:13: required from 'bool boost::spirit::qi::phrase_parse(Iterator&, Iterator, const Expr&, const Skipper&, boost::spirit::qi::skip_flag::enum_type, Attr&) [with Iterator = __gnu_cxx::__normal_iterator >; Expr = boost::proto::exprns_::expr&, boost::proto::exprns_::expr, 0l> >, 2l>; Skipper = boost::proto::exprns_::expr >, 0l>; Attr = std::vector]' /home/ulfi/include/boost/spirit/home/qi/parse.hpp:210:32: required from 'bool boost::spirit::qi::phrase_parse(const Iterator&, Iterator, const Expr&, const Skipper&, Attr&) [with Iterator = __gnu_cxx::__normal_iterator >; Expr = boost::proto::exprns_::expr&, boost::proto::exprns_::expr, 0l> >, 2l>; Skipper = boost::proto::exprns_::expr >, 0l>; Attr = std::vector]' test.cpp:14:2: required from here /home/ulfi/include/boost/spirit/home/qi/numeric/detail/real_impl.hpp:72:47: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (is_floating_point() && exp > max_exp) ^ In file included from /home/ulfi/include/boost/spirit/home/qi/numeric/numeric_utils.hpp:17:0, from /home/ulfi/include/boost/spirit/home/qi/numeric/int.hpp:17, from /home/ulfi/include/boost/spirit/home/qi/numeric.hpp:15, from /home/ulfi/include/boost/spirit/home/qi.hpp:22, from /home/ulfi/include/boost/spirit/include/qi.hpp:16, from test.cpp:1: /home/ulfi/include/boost/spirit/home/qi/numeric/detail/numeric_utils.hpp: In instantiation of 'static bool boost::spirit::qi::detail::extract_int::parse_main(Iterator&, const Iterator&, Attribute&) [with Iterator = __gnu_cxx::__normal_iterator >; Attribute = long unsigned int; T = long unsigned int; unsigned int Radix = 10u; unsigned int MinDigits = 1u; int MaxDigits = -1; Accumulator = boost::spirit::qi::detail::positive_accumulator<10u>; bool Accumulate = true; bool IgnoreOverflowDigits = true]': /home/ulfi/include/boost/spirit/home/qi/numeric/detail/numeric_utils.hpp:371:30: required from 'static bool boost::spirit::qi::detail::extract_int::parse(Iterator&, const Iterator&, Attribute&) [with Iterator = __gnu_cxx::__normal_iterator >; Attribute = long unsigned int; T = long unsigned int; unsigned int Radix = 10u; unsigned int MinDigits = 1u; int MaxDigits = -1; Accumulator = boost::spirit::qi::detail::positive_accumulator<10u>; bool Accumulate = true; bool IgnoreOverflowDigits = true]' /home/ulfi/include/boost/spirit/home/qi/numeric/numeric_utils.hpp:72:37: required from 'static bool boost::spirit::qi::extract_uint::call(Iterator&, const Iterator&, T&) [with Iterator = __gnu_cxx::__normal_iterator >; T = long unsigned int; unsigned int Radix = 10u; unsigned int MinDigits = 1u; int MaxDigits = -1; bool Accumulate = true; bool IgnoreOverflowDigits = true]' /home/ulfi/include/boost/spirit/home/qi/numeric/real_policies.hpp:60:74: required from 'static bool boost::spirit::qi::ureal_policies::parse_frac_n(Iterator&, const Iterator&, Attribute&, int&) [with Iterator = __gnu_cxx::__normal_iterator >; Attribute = long unsigned int; T = double]' /home/ulfi/include/boost/spirit/home/qi/numeric/detail/real_impl.hpp:234:17: required from 'static bool boost::spirit::qi::detail::real_impl::parse(Iterator&, const Iterator&, Attribute&, const RealPolicies&) [with Iterator = __gnu_cxx::__normal_iterator >; Attribute = double; T = double; RealPolicies = boost::spirit::qi::real_policies]' /home/ulfi/include/boost/spirit/home/qi/numeric/real.hpp:168:34: required from 'bool boost::spirit::qi::any_real_parser::parse(Iterator&, const Iterator&, Context&, const Skipper&, T&) const [with Iterator = __gnu_cxx::__normal_iterator >; Context = boost::spirit::context&, boost::fusion::nil_>, boost::spirit::locals<> >; Skipper = boost::spirit::qi::char_class >; T = double; RealPolicies = boost::spirit::qi::real_policies]' /home/ulfi/include/boost/spirit/home/qi/detail/fail_function.hpp:38:20: [ skipping 3 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ] /home/ulfi/include/boost/spirit/home/qi/detail/pass_container.hpp:351:38: required from 'bool boost::spirit::qi::detail::pass_container::operator()(const Component&) const [with Component = boost::spirit::qi::any_real_parser >; F = boost::spirit::qi::detail::fail_function<__gnu_cxx::__normal_iterator >, boost::spirit::context&, boost::fusion::nil_>, boost::spirit::locals<> >, boost::spirit::qi::char_class > >; Attr = std::vector; Sequence = mpl_::bool_]' /home/ulfi/include/boost/spirit/home/qi/operator/list.hpp:65:19: required from 'bool boost::spirit::qi::list::parse_container(F) const [with F = boost::spirit::qi::detail::pass_container >, boost::spirit::context&, boost::fusion::nil_>, boost::spirit::locals<> >, boost::spirit::qi::char_class > >, std::vector, mpl_::bool_ >; Left = boost::spirit::qi::any_real_parser >; Right = boost::spirit::qi::literal_char]' /home/ulfi/include/boost/spirit/home/qi/operator/list.hpp:93:33: required from 'bool boost::spirit::qi::list::parse(Iterator&, const Iterator&, Context&, const Skipper&, Attribute&) const [with Iterator = __gnu_cxx::__normal_iterator >; Context = boost::spirit::context&, boost::fusion::nil_>, boost::spirit::locals<> >; Skipper = boost::spirit::qi::char_class >; Attribute = std::vector; Left = boost::spirit::qi::any_real_parser >; Right = boost::spirit::qi::literal_char]' /home/ulfi/include/boost/spirit/home/qi/parse.hpp:164:13: required from 'bool boost::spirit::qi::phrase_parse(Iterator&, Iterator, const Expr&, const Skipper&, boost::spirit::qi::skip_flag::enum_type, Attr&) [with Iterator = __gnu_cxx::__normal_iterator >; Expr = boost::proto::exprns_::expr&, boost::proto::exprns_::expr, 0l> >, 2l>; Skipper = boost::proto::exprns_::expr >, 0l>; Attr = std::vector]' /home/ulfi/include/boost/spirit/home/qi/parse.hpp:210:32: required from 'bool boost::spirit::qi::phrase_parse(const Iterator&, Iterator, const Expr&, const Skipper&, Attr&) [with Iterator = __gnu_cxx::__normal_iterator >; Expr = boost::proto::exprns_::expr&, boost::proto::exprns_::expr, 0l> >, 2l>; Skipper = boost::proto::exprns_::expr >, 0l>; Attr = std::vector]' test.cpp:14:2: required from here /home/ulfi/include/boost/spirit/home/qi/numeric/detail/numeric_utils.hpp:319:66: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while (it != last && *it == '0' && leading_zeros < MaxDigits ^ $ valgrind ./test ==2075== Memcheck, a memory error detector ==2075== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==2075== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info ==2075== Command: ./test ==2075== 1_59 ==2075== Conditional jump or move depends on uninitialised value(s) ==2075== at 0x40318E: bool boost::spirit::qi::detail::real_impl >::parse<__gnu_cxx::__normal_iterator, double>(__gnu_cxx::__normal_iterator&, __gnu_cxx::__normal_iterator const&, double&, boost::spirit::qi::real_policies const&) (real_impl.hpp:295) ==2075== by 0x402DA6: bool boost::spirit::qi::any_real_parser >::parse<__gnu_cxx::__normal_iterator, boost::spirit::context >&, boost::fusion::nil_>, boost::spirit::locals >, boost::spirit::qi::char_class > >(__gnu_cxx::__normal_iterator&, __gnu_cxx::__normal_iterator const&, boost::spirit::context >&, boost::fusion::nil_>, boost::spirit::locals >&, boost::spirit::qi::char_class > const&, double&) const (real.hpp:168) ==2075== by 0x402BC6: bool boost::spirit::qi::detail::fail_function<__gnu_cxx::__normal_iterator, boost::spirit::context >&, boost::fusion::nil_>, boost::spirit::locals >, boost::spirit::qi::char_class > >::operator() >, double>(boost::spirit::qi::any_real_parser > const&, double&) const (fail_function.hpp:38) ==2075== by 0x402919: bool boost::spirit::qi::detail::pass_container, boost::spirit::context >&, boost::fusion::nil_>, boost::spirit::locals >, boost::spirit::qi::char_class > >, std::vector >, mpl_::bool_ >::dispatch_container > >(boost::spirit::qi::any_real_parser > const&, mpl_::bool_) const (pass_container.hpp:283) ==2075== by 0x402745: bool boost::spirit::qi::detail::pass_container, boost::spirit::context >&, boost::fusion::nil_>, boost::spirit::locals >, boost::spirit::qi::char_class > >, std::vector >, mpl_::bool_ >::dispatch_attribute > >(boost::spirit::qi::any_real_parser > const&, mpl_::bool_) const (pass_container.hpp:331) ==2075== by 0x4023C0: bool boost::spirit::qi::detail::pass_container, boost::spirit::context >&, boost::fusion::nil_>, boost::spirit::locals >, boost::spirit::qi::char_class > >, std::vector >, mpl_::bool_ >::operator() > >(boost::spirit::qi::any_real_parser > const&) const (pass_container.hpp:351) ==2075== by 0x4021A6: bool boost::spirit::qi::list >, boost::spirit::qi::literal_char >::parse_container, boost::spirit::context >&, boost::fusion::nil_>, boost::spirit::locals >, boost::spirit::qi::char_class > >, std::vector >, mpl_::bool_ > >(boost::spirit::qi::detail::pass_container, boost::spirit::context >&, boost::fusion::nil_>, boost::spirit::locals >, boost::spirit::qi::char_class > >, std::vector >, mpl_::bool_ >) const (list.hpp:70) ==2075== by 0x401F0B: bool boost::spirit::qi::list >, boost::spirit::qi::literal_char >::parse<__gnu_cxx::__normal_iterator, boost::spirit::context >&, boost::fusion::nil_>, boost::spirit::locals >, boost::spirit::qi::char_class >, std::vector > >(__gnu_cxx::__normal_iterator&, __gnu_cxx::__normal_iterator const&, boost::spirit::context >&, boost::fusion::nil_>, boost::spirit::locals >&, boost::spirit::qi::char_class > const&, std::vector >&) const (list.hpp:93) ==2075== by 0x401D06: bool boost::spirit::qi::phrase_parse<__gnu_cxx::__normal_iterator, boost::proto::exprns_::expr const&, boost::proto::exprns_::expr, 0l> >, 2l>, boost::proto::exprns_::expr >, 0l>, std::vector > >(__gnu_cxx::__normal_iterator&, __gnu_cxx::__normal_iterator, boost::proto::exprns_::expr const&, boost::proto::exprns_::expr, 0l> >, 2l> const&, boost::proto::exprns_::expr >, 0l> const&, boost::spirit::qi::skip_flag::enum_type, std::vector >&) (parse.hpp:164) ==2075== by 0x401B8C: bool boost::spirit::qi::phrase_parse<__gnu_cxx::__normal_iterator, boost::proto::exprns_::expr const&, boost::proto::exprns_::expr, 0l> >, 2l>, boost::proto::exprns_::expr >, 0l>, std::vector > >(__gnu_cxx::__normal_iterator const&, __gnu_cxx::__normal_iterator, boost::proto::exprns_::expr const&, boost::proto::exprns_::expr, 0l> >, 2l> const&, boost::proto::exprns_::expr >, 0l> const&, std::vector >&) (parse.hpp:210) ==2075== by 0x401153: main (test.cpp:14) ==2075== 1 119 80 35 0 29 0.263 29 1 ==2075== ==2075== HEAP SUMMARY: ==2075== in use at exit: 72,704 bytes in 1 blocks ==2075== total heap usage: 7 allocs, 6 frees, 73,008 bytes allocated ==2075== ==2075== LEAK SUMMARY: ==2075== definitely lost: 0 bytes in 0 blocks ==2075== indirectly lost: 0 bytes in 0 blocks ==2075== possibly lost: 0 bytes in 0 blocks ==2075== still reachable: 72,704 bytes in 1 blocks ==2075== suppressed: 0 bytes in 0 blocks ==2075== Rerun with --leak-check=full to see details of leaked memory ==2075== ==2075== For counts of detected and suppressed errors, rerun with: -v ==2075== Use --track-origins=yes to see where uninitialised values come from ==2075== ERROR SUMMARY: 6 errors from 1 contexts (suppressed: 0 from 0)