
Dear all, I have a piece of code in which contains: template<typename L, typename R> void FuncStreamCtx::operator () (tag::shift_right, const L& l, const R& r) const { evaluate_helper(l, *this); const typename result_of::value<R>::type f = value(r); } When I compile this under GCC 4.5.1 (MinGW, WinXP, SP3), I get a large spew of warnings. My related piece of code which I guess would be helpful is: double plus1(double i) {return i + 1;} double plus2(double i) {return i + 2;} struct FuncStreamCtx: callable_context<const FuncStreamCtx, null_context> { FuncStreamCtx() {} typedef void result_type; void operator () (tag::terminal, double) const; template<typename L, typename R> void operator () (tag::shift_right, const L&, const R&) const; const vector<double>& state() const {return data_;} private: void set_single_value(double) const; mutable vector<double> data_; }; template<typename Expr> const vector<double>& evaluate_helper(const Expr& e, const FuncStreamCtx& ctx) { boost::proto::eval(e, ctx); return ctx.state(); } template<typename Expr> void evaluate(const Expr& e, vector<double>& v) { const FuncStreamCtx ctx; v = evaluate_helper(e, ctx); } template<typename L, typename R> void FuncStreamCtx::operator () (tag::shift_right, const L& l, const R& r) const { evaluate_helper(l, *this); const typename result_of::value<R>::type f = value(r); } int main() { vector<double> v; evaluate(lit(51.6) >> &plus2 >> &plus2 >> &plus1, v); cout << "Result = "; copy(v.begin(), v.end(), ostream_iterator<double>(cout, " ")); return 0; } I have also included the warnings in the P.S. Any idea what the compiler is saying? And, should I do anything about it? TIA, --Hossein P.S. -------------- Build: Debug in ProtoGame3 --------------- Compiling: main.cpp D:\My Documents\My Programmes\Tutorial\Proto\ProtoGame3\main.cpp: In member function 'void FuncStreamCtx::operator()(boost::proto::tag::shift_right, const L&, const R&) const [with L = boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::utility::literal<const double&, boost::proto::domainns_::default_domain>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>, R = boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l>]': D:\Sources\Boost\boost_1_42_0/boost/proto/context/callable.hpp:313:21: instantiated from 'boost::proto::context::callable_eval<Expr, Context, 2l>::result_type boost::proto::context::callable_eval<Expr, Context, 2l>::operator()(Expr&, Context&) const [with Expr = const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::utility::literal<const double&, boost::proto::domainns_::default_domain>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>, Context = const FuncStreamCtx, boost::proto::context::callable_eval<Expr, Context, 2l>::result_type = void]' D:\Sources\Boost\boost_1_42_0/boost/proto/eval.hpp:100:62: instantiated from 'typename boost::proto::result_of::eval<Expr, Context>::type boost::proto::eval(Expr&, const Context&) [with Expr = const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::utility::literal<const double&, boost::proto::domainns_::default_domain>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>, Context = FuncStreamCtx, typename boost::proto::result_of::eval<Expr, Context>::type = void]' D:\My Documents\My Programmes\Tutorial\Proto\ProtoGame3\main.cpp:44:2: instantiated from 'const std::vector<double>& evaluate_helper(const Expr&, const FuncStreamCtx&) [with Expr = boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::utility::literal<const double&, boost::proto::domainns_::default_domain>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>]' D:\My Documents\My Programmes\Tutorial\Proto\ProtoGame3\main.cpp:52:2: instantiated from 'void evaluate(const Expr&, std::vector<double>&) [with Expr = boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::utility::literal<const double&, boost::proto::domainns_::default_domain>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>]' D:\My Documents\My Programmes\Tutorial\Proto\ProtoGame3\main.cpp:80:53: instantiated from here D:\My Documents\My Programmes\Tutorial\Proto\ProtoGame3\main.cpp:74:43: warning: unused variable 'f' D:\My Documents\My Programmes\Tutorial\Proto\ProtoGame3\main.cpp: In member function 'void FuncStreamCtx::operator()(boost::proto::tag::shift_right, const L&, const R&) const [with L = boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::utility::literal<const double&, boost::proto::domainns_::default_domain>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>, R = boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l>]': D:\Sources\Boost\boost_1_42_0/boost/proto/context/callable.hpp:313:21: instantiated from 'boost::proto::context::callable_eval<Expr, Context, 2l>::result_type boost::proto::context::callable_eval<Expr, Context, 2l>::operator()(Expr&, Context&) const [with Expr = const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::utility::literal<const double&, boost::proto::domainns_::default_domain>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>, Context = const FuncStreamCtx, boost::proto::context::callable_eval<Expr, Context, 2l>::result_type = void]' D:\Sources\Boost\boost_1_42_0/boost/proto/eval.hpp:100:62: instantiated from 'typename boost::proto::result_of::eval<Expr, Context>::type boost::proto::eval(Expr&, const Context&) [with Expr = const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::utility::literal<const double&, boost::proto::domainns_::default_domain>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>, Context = FuncStreamCtx, typename boost::proto::result_of::eval<Expr, Context>::type = void]' D:\My Documents\My Programmes\Tutorial\Proto\ProtoGame3\main.cpp:44:2: instantiated from 'const std::vector<double>& evaluate_helper(const Expr&, const FuncStreamCtx&) [with Expr = boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::utility::literal<const double&, boost::proto::domainns_::default_domain>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>]' D:\My Documents\My Programmes\Tutorial\Proto\ProtoGame3\main.cpp:73:2: instantiated from 'void FuncStreamCtx::operator()(boost::proto::tag::shift_right, const L&, const R&) const [with L = boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::utility::literal<const double&, boost::proto::domainns_::default_domain>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>, R = boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l>]' D:\Sources\Boost\boost_1_42_0/boost/proto/context/callable.hpp:313:21: instantiated from 'boost::proto::context::callable_eval<Expr, Context, 2l>::result_type boost::proto::context::callable_eval<Expr, Context, 2l>::operator()(Expr&, Context&) const [with Expr = const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::utility::literal<const double&, boost::proto::domainns_::default_domain>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>, Context = const FuncStreamCtx, boost::proto::context::callable_eval<Expr, Context, 2l>::result_type = void]' D:\Sources\Boost\boost_1_42_0/boost/proto/eval.hpp:100:62: instantiated from 'typename boost::proto::result_of::eval<Expr, Context>::type boost::proto::eval(Expr&, const Context&) [with Expr = const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::utility::literal<const double&, boost::proto::domainns_::default_domain>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>, Context = FuncStreamCtx, typename boost::proto::result_of::eval<Expr, Context>::type = void]' D:\My Documents\My Programmes\Tutorial\Proto\ProtoGame3\main.cpp:44:2: instantiated from 'const std::vector<double>& evaluate_helper(const Expr&, const FuncStreamCtx&) [with Expr = boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::utility::literal<const double&, boost::proto::domainns_::default_domain>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>]' D:\My Documents\My Programmes\Tutorial\Proto\ProtoGame3\main.cpp:52:2: instantiated from 'void evaluate(const Expr&, std::vector<double>&) [with Expr = boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::utility::literal<const double&, boost::proto::domainns_::default_domain>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>]' D:\My Documents\My Programmes\Tutorial\Proto\ProtoGame3\main.cpp:80:53: instantiated from here D:\My Documents\My Programmes\Tutorial\Proto\ProtoGame3\main.cpp:74:43: warning: unused variable 'f' D:\My Documents\My Programmes\Tutorial\Proto\ProtoGame3\main.cpp: In member function 'void FuncStreamCtx::operator()(boost::proto::tag::shift_right, const L&, const R&) const [with L = boost::proto::utility::literal<const double&, boost::proto::domainns_::default_domain>, R = boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l>]': D:\Sources\Boost\boost_1_42_0/boost/proto/context/callable.hpp:313:21: instantiated from 'boost::proto::context::callable_eval<Expr, Context, 2l>::result_type boost::proto::context::callable_eval<Expr, Context, 2l>::operator()(Expr&, Context&) const [with Expr = const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::utility::literal<const double&, boost::proto::domainns_::default_domain>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>, Context = const FuncStreamCtx, boost::proto::context::callable_eval<Expr, Context, 2l>::result_type = void]' D:\Sources\Boost\boost_1_42_0/boost/proto/eval.hpp:100:62: instantiated from 'typename boost::proto::result_of::eval<Expr, Context>::type boost::proto::eval(Expr&, const Context&) [with Expr = const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::utility::literal<const double&, boost::proto::domainns_::default_domain>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>, Context = FuncStreamCtx, typename boost::proto::result_of::eval<Expr, Context>::type = void]' D:\My Documents\My Programmes\Tutorial\Proto\ProtoGame3\main.cpp:44:2: instantiated from 'const std::vector<double>& evaluate_helper(const Expr&, const FuncStreamCtx&) [with Expr = boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::utility::literal<const double&, boost::proto::domainns_::default_domain>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>]' D:\My Documents\My Programmes\Tutorial\Proto\ProtoGame3\main.cpp:73:2: instantiated from 'void FuncStreamCtx::operator()(boost::proto::tag::shift_right, const L&, const R&) const [with L = boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::utility::literal<const double&, boost::proto::domainns_::default_domain>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>, R = boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l>]' D:\Sources\Boost\boost_1_42_0/boost/proto/context/callable.hpp:313:21: instantiated from 'boost::proto::context::callable_eval<Expr, Context, 2l>::result_type boost::proto::context::callable_eval<Expr, Context, 2l>::operator()(Expr&, Context&) const [with Expr = const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::utility::literal<const double&, boost::proto::domainns_::default_domain>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>, Context = const FuncStreamCtx, boost::proto::context::callable_eval<Expr, Context, 2l>::result_type = void]' D:\Sources\Boost\boost_1_42_0/boost/proto/eval.hpp:100:62: [ skipping 2 instantiation contexts ] D:\My Documents\My Programmes\Tutorial\Proto\ProtoGame3\main.cpp:73:2: instantiated from 'void FuncStreamCtx::operator()(boost::proto::tag::shift_right, const L&, const R&) const [with L = boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::utility::literal<const double&, boost::proto::domainns_::default_domain>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>, R = boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l>]' D:\Sources\Boost\boost_1_42_0/boost/proto/context/callable.hpp:313:21: instantiated from 'boost::proto::context::callable_eval<Expr, Context, 2l>::result_type boost::proto::context::callable_eval<Expr, Context, 2l>::operator()(Expr&, Context&) const [with Expr = const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::utility::literal<const double&, boost::proto::domainns_::default_domain>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>, Context = const FuncStreamCtx, boost::proto::context::callable_eval<Expr, Context, 2l>::result_type = void]' D:\Sources\Boost\boost_1_42_0/boost/proto/eval.hpp:100:62: instantiated from 'typename boost::proto::result_of::eval<Expr, Context>::type boost::proto::eval(Expr&, const Context&) [with Expr = const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::utility::literal<const double&, boost::proto::domainns_::default_domain>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>, Context = FuncStreamCtx, typename boost::proto::result_of::eval<Expr, Context>::type = void]' D:\My Documents\My Programmes\Tutorial\Proto\ProtoGame3\main.cpp:44:2: instantiated from 'const std::vector<double>& evaluate_helper(const Expr&, const FuncStreamCtx&) [with Expr = boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::utility::literal<const double&, boost::proto::domainns_::default_domain>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>]' D:\My Documents\My Programmes\Tutorial\Proto\ProtoGame3\main.cpp:52:2: instantiated from 'void evaluate(const Expr&, std::vector<double>&) [with Expr = boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::utility::literal<const double&, boost::proto::domainns_::default_domain>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>&, boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<double (* const&)(double)>, 0l> >, 2l>]' D:\My Documents\My Programmes\Tutorial\Proto\ProtoGame3\main.cpp:80:53: instantiated from here D:\My Documents\My Programmes\Tutorial\Proto\ProtoGame3\main.cpp:74:43: warning: unused variable 'f' Linking console executable: bin\Debug\ProtoGame3.exe Output size is 1.08 MB Process terminated with status 0 (0 minutes, 4 seconds) 1 errors, 3 warnings

On 1/5/2011 5:40 PM, Hossein Haeri wrote:
Dear all,
I have a piece of code in which contains:
template<typename L, typename R> void FuncStreamCtx::operator () (tag::shift_right, const L& l, const R& r) const { evaluate_helper(l, *this); const typename result_of::value<R>::type f = value(r); }
Warning: variable 'f' is unused. :-) That was easy. -- Eric Niebler BoostPro Computing http://www.boostpro.com

Hi Erik,
Warning: variable 'f' is unused. :-)
:-? So, you mean all that fuss was to show me where it's been instantiating that f? If so, why does the compile log end in the following lines? Process terminated with status 0 (0 minutes, 4 seconds) 1 errors, 3 warnings Where is the error? :-/ GCC bug? TIA, --Hossein

On 1/5/2011 7:31 PM, Hossein Haeri wrote:
Hi Erik,
That's Eric, with a 'c'.
Warning: variable 'f' is unused. :-)
:-? So, you mean all that fuss was to show me where it's been instantiating that f?
Yes.
If so, why does the compile log end in the following lines?
Process terminated with status 0 (0 minutes, 4 seconds) 1 errors, 3 warnings
Where is the error? :-/ GCC bug?
I don't know. Did you compile with -Werror? -- Eric Niebler BoostPro Computing http://www.boostpro.com

Hi there.
Hi Erik,
That's Eric, with a 'c'.
Oh, I'm sorry :(
If so, why does the compile log end in the following lines?
Process terminated with status 0 (0 minutes, 4 seconds) 1 errors, 3 warnings
Where is the error? :-/ GCC bug?
I don't know. Did you compile with -Werror?
Not really. :-? --Hossein
participants (2)
-
Eric Niebler
-
Hossein Haeri