Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-12-07 17:24:10


"Mark Rodgers" <mark.rodgers_at_[hidden]> writes:

> From: "David Abrahams" <dave_at_[hidden]>
>> "John Maddock" <jm_at_[hidden]> writes:
>>
>> >> If this fails to compile, we may need to add a dummy "return 0;" at
>> >> the end. I know of two compilers which act this way: Metrowerks and
>> >> HP.
>> >
>> > What do you want to call it?
>>
>> I'm not happy with it, but...
>>
>> BOOST_NO_NON_RETURN_PATH_COMPREHENSION is the best I could come up
>> with :(
>
> What about having
>
> BOOST_UNREACHABLE_RETURN(0)
> or
> BOOST_UNREACHABLE_RETURN("")

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:

    #ifdef BOOST_NO_NON_RETURN_PATH_COMPREHENSION
           return whatever;
    #endif

But I like yours better.

-- 
                       David Abrahams
   dave_at_[hidden] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk