Warning "declares a non-template function"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Warning "declares a non-template function"

Boost - Users mailing list

Hi,

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< >*

?

 

 

Regards,

Mahmood

 


_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Warning "declares a non-template function"

Boost - Users mailing list
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 mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users