Boost logo

Boost :

From: Samuel Krempp (krempp_at_[hidden])
Date: 2002-12-09 09:32:13

le Samedi 7 Décembre 2002 23:24, dave_at_[hidden] écrivit :
>> What about having
>> or
> I like it!
>> I think we need to "return" values for types other than int.
> Of course. My suggestion would have just been used thus:
> return whatever;
> #endif
> But I like yours better.

the name is nicer, but the usage can be less self-documenting than the
ifdefed return.
for someone who doesn't know the macro, he cant be 100% sure what
preprocessing magic BOOST_UNREACHABLE_RETURN(0) will do, and so might need
to go find that macro's definition
(and when dozens of macro are designed and used like that, it gets painful
for a new user to read the code)

On the opposite hand, using the same kind of naming scheme,
     return whatever;

the purpose is 100% self-evident, and the random reader gets it instantly
(whatever the name of the macro)

it looks like the macro has now already been introduced, but I liked the
plain ifdefed return better..

Anyway, that's just my opinion on this rather esthetical matter, for what
it's worth.

my-0.02¤-ly y'rs,


Boost list run by bdawes at, gregod at, cpdaniel at, john at