|
Boost : |
Subject: Re: [boost] [result_of] Regression: compilation errors on C++03 compilers when defining BOOST_RESULT_OF_USE_DECLTYPE
From: Nathan Ridge (zeratul976_at_[hidden])
Date: 2012-04-25 19:34:08
> >>> If we define BOOST_RESULT_OF_USE_DECLTYPE,
> >>> boost::result_of tries to use decltype-based implementation
> >>> even on C++03 compilers. This causes compilation errors
> >>> and it is a regression on C++03 compilers.
> >>>
> >>> Is it intentional change?
> >>
> >> I did intend this change.
> >
> > I think this breaks too much code. Every code that
> > (directly or indirectly) includes boost::result_of
> > with `#define BOOST_RESULT_OF_USE_DECLTYPE`
> > breaks in C++03.
>
> Why would you ask result_of to use decltype when you don't have it?
+1
Defining BOOST_RESULT_OF_USE_DECLTYPE when your compiler
doesn't support decltype seems like a logic error to me. I would rather be
alerted to logic errors than have an explicit instruction (defining
BOOST_RESULT_OF_USE_DECLTYPE) be ignored to work around them.
Regards,
Nate
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk