
I was hoping I'd be able to fix this once and be done with it, but alas it is not to be. I need to change my fix. The problem has been noted here already in the thread "std_min/std_max reference return value is problematic with boost::interval." Basically, the std_min/std_max helpers cannot be made to work on old compilers that cannot detect reference returns. I have to rip out std_min and std_max. If you want to make an unqualified call to min or max, the recommended way will be as follows: using std::min; min BOOST_PREVENT_MACRO_SUBSTITUTION ( a, b ); I have 2 questions: 1) Is this the best name for the macro? Perhaps people would prefer something shorter. I'm open to suggestions. 2) Is there anyone who wants me to hold off until they finish making some big check-in to avoid merge hell? If so, please contact me privately and we'll work out a schedule. Thanks. -- Eric Niebler Boost Consulting www.boost-consulting.com

[mailto:boost-bounces@lists.boost.org] On Behalf Of Eric Niebler
using std::min; min BOOST_PREVENT_MACRO_SUBSTITUTION ( a, b );
I have 2 questions: 1) Is this the best name for the macro? Perhaps people would prefer something shorter. I'm open to suggestions.
You can always use BOOST_PP_EMPTY. using std::min; min BOOST_PP_EMPTY()(a, b); I'll point out again that you have to be careful with either of the above methods if they are ever used as an argument to a macro. This causes more than one scan of the pp-tokens, which will allow min and max to expand as macros if they are macros: #define EXPAND(x) x EXPAND( min BOOST_PP_EMPTY()(a, b); ) On a reasonably conformant preprocessor, the above or similar will still expand min if it is a macro. Regards, Paul Mensonides
participants (2)
-
Eric Niebler
-
Paul Mensonides