Boost logo

Boost Users :

Subject: Re: [Boost-users] Warning "declares a non-template function"
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2017-11-06 15:50:39


AMDG

On 11/03/2017 09:49 AM, mahmood n via Boost-users wrote:
> A program needs boost > 1.58. So, I used boost-1.60 with gcc-4.8. However, as I compile the program, I get many warnings similar to
>
> /home/mahmood/boost_1_60_0/boost/mpl/set/aux_/item.hpp(47): warning: "char (&operator||(const boost::mpl::s_item<T, Base> &, boost::mpl::aux::type_wrapper<T> *))[boost::mpl::next<Base::order>::type::value]" declares a non-template function -- add <> to refer to a template instance
> /home/mahmood/boost_1_60_0/boost/mpl/set/aux_/item.hpp(48): warning: "boost::mpl::aux::no_tag operator%(const boost::mpl::s_item<T, Base> &, boost::mpl::aux::type_wrapper<T> *)" declares a non-template function -- add <> to refer to a template instance
>
>
> Lines are
>
> BOOST_MPL_AUX_SET_OVERLOAD( order_tag_, ORDER_BY_KEY, s_item, aux::type_wrapper<T>* );
> BOOST_MPL_AUX_SET_OVERLOAD( aux::no_tag, IS_MASKED, s_item, aux::type_wrapper<T>* );
>
> Does that mean I have to change that to aux::type_wrapper< >*
> ?
>

  The warning is spurious. Declaring a non-template function
is the intent of this code in the first place.

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net