Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost][unit] Intel v12 compiler warning
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-11-27 14:13:29


AMDG

On 11/27/2010 10:40 AM, Marshall Clow wrote:
> On Nov 27, 2010, at 10:22 AM, Belcourt, K. Noel wrote:
>> Just wanted to point out this warning from the Intel v12 compiler.
>>
>> /Users/kbelco/boost/boost/units/unit.hpp(49): warning #1011: missing return statement at end of non-void function "boost::units::unit<Dim, System, Enable>::operator=(const boost::units::unit<D, S, void> &)"
>> this_type& operator=(const this_type&) { }
>>
>> Perhaps there's an easy warning suppression fix?
> Interesting.
> That's a class that, as far as I can tell, has no data members - just routines and typedefs.
>
> If so, I think that the best solution would be to remove the copy constructor and the assignment operator and let the compiler generate them (and probably the default constructor, too).
>
> Remove code, reduce warnings. :-)

I'm hesitant to remove them, because I recall
having to add default constructors to some
classes to keep at least one compiler happy.

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