Re: [boost] Re: [Config] Testing instructions for compiler vendors

2002-12-18 Thread David Abrahams
Gennaro Prota [EMAIL PROTECTED] writes: On Tue, 17 Dec 2002 11:44:12 -, John Maddock [EMAIL PROTECTED] wrote: Personally I would rather that you stuck to the simplest possible implementation, and for me that outweighs the advantages that using the pp lib might bring. The recent discussion

Re: [boost] Re: [Config] Testing instructions for compiler vendors

2002-12-18 Thread Gennaro Prota
--- David Abrahams [EMAIL PROTECTED] wrote: I'd much prefer: BOOST_WORKAROUND(__SUNPRO_CC, BOOST_LATEST_VERSION(0x530)) Which I think is easily achievable, no? # define BOOST_WORKAROUND(symbol, test) (symbol != 0) (1 % ((symbol test) + 1)) # ifdef BOOST_DETECT_OUTDATED

Re: [boost] Re: [Config] Testing instructions for compiler vendors

2002-12-18 Thread Gennaro Prota
--- Gennaro Prota [EMAIL PROTECTED] wrote: For Borland [...] // There seems to be no way to make Borland honor 5p5 // when evaluating the controlling expression of a #if, // but it supports sizeof expressions therein. // #define BOOST_WORKAROUND(symbol, test) \ ((symbol

[boost] Re: [Config] Testing instructions for compiler vendors

2002-12-17 Thread Gennaro Prota
On Tue, 17 Dec 2002 11:44:12 -, John Maddock [EMAIL PROTECTED] wrote: Personally I would rather that you stuck to the simplest possible implementation, and for me that outweighs the advantages that using the pp lib might bring. The recent discussion is all very clever, but I'm not convinced

Re: [boost] Re: [Config] Testing instructions for compiler vendors

2002-12-16 Thread David Abrahams
Paul Mensonides [EMAIL PROTECTED] writes: - Original Message - From: David Abrahams [EMAIL PROTECTED] I understand what you're saying, but I think inline if doesn't reflect what it's doing and IIF is still not memnonic. It ultimately from (don't laugh) VB's version of the ternary

Re: [boost] Re: [Config] Testing instructions for compiler vendors

2002-12-16 Thread Paul Mensonides
- Original Message - From: David Abrahams [EMAIL PROTECTED] I understand what you're saying, but I think inline if doesn't reflect what it's doing and IIF is still not memnonic. It ultimately from (don't laugh) VB's version of the ternary operator--called iif. Ha har hee hee

Re: [boost] Re: [Config] Testing instructions for compiler vendors

2002-12-16 Thread Terje Slettebø
From: Paul Mensonides [EMAIL PROTECTED] From: David Abrahams [EMAIL PROTECTED] I understand what you're saying, but I think inline if doesn't reflect what it's doing and IIF is still not memnonic. It ultimately from (don't laugh) VB's version of the ternary operator--called iif.

Re: [boost] Re: [Config] Testing instructions for compiler vendors

2002-12-16 Thread Paul Mensonides
- Original Message - From: Terje Slettebø [EMAIL PROTECTED] I've been converted. I swear! When I was young, I had to walk to school in three feet of snow uphill both ways--and, worse yet, I had to program in Visual Basic! It doesn't get any more wordy than this: Public

Re: [boost] Re: [Config] Testing instructions for compiler vendors

2002-12-14 Thread David Abrahams
Paul Mensonides [EMAIL PROTECTED] writes: - Original Message - From: Paul Mensonides [EMAIL PROTECTED] Unfortunately I like all of the above except the last one. I'd even like the last one, perhaps best of all, if it were: BOOST_WORKAROUND(__SUNPRO_CC, (?) = 0x530) So

[boost] Re: [Config] Testing instructions for compiler vendors

2002-12-14 Thread Gennaro Prota
On Sat, 14 Dec 2002 10:49:30 -0500, David Abrahams [EMAIL PROTECTED] wrote: Someone expressed concern about using the PP lib in the definition of this macro, because, after all, the PP lib itself might want to use it. I presume you're not worried about that, though. Sorry to ruin your fun but

Re: [boost] Re: [Config] Testing instructions for compiler vendors

2002-12-14 Thread Paul Mensonides
- Original Message - From: Gennaro Prota [EMAIL PROTECTED] Someone expressed concern about using the PP lib in the definition of this macro, because, after all, the PP lib itself might want to use it. I presume you're not worried about that, though. Sorry to ruin your fun but I'm

[boost] Re: [Config] Testing instructions for compiler vendors

2002-12-13 Thread Gennaro Prota
On Thu, 12 Dec 2002 17:52:58 -0800, Paul Mensonides [EMAIL PROTECTED] wrote: Does it only emit a warning for modulus by zero too? Yes. I don't know about Kylix but all the other flavours of Borland C++ just give W8082 for both / and %, in constant expressions (by default; of course you can

[boost] Re: [Config] Testing instructions for compiler vendors

2002-12-13 Thread Gennaro Prota
On Fri, 13 Dec 2002 17:07:26 -0500, David Abrahams [EMAIL PROTECTED] wrote: BOOST_WORKAROUND(__SUNPRO_CC, (!) = 0x530) Why that one? Isn't this getting a little obscure? Does anybody else care how this turns out? Actually I liked it at once, because I associate the exclamation mark with the

Re: [boost] Re: [Config] Testing instructions for compiler vendors

2002-12-12 Thread David Abrahams
Paul Mensonides [EMAIL PROTECTED] writes: - Original Message - From: David Abrahams [EMAIL PROTECTED] David Abrahams [EMAIL PROTECTED] writes: How can we say #if BOOST_WORKAROUND(__SUNPRO_CC, /*something involving 0x530 */) and have it enter the #if and warn when

Re: [boost] Re: [Config] Testing instructions for compiler vendors

2002-12-12 Thread Paul Mensonides
- Original Message - From: David Abrahams [EMAIL PROTECTED] Errors are not a good response here, unless of course that's done purely as an option. I was under the impression that causing errors and/or warnings was so developers could be reminded of some type of hack for some compiler.

Re: [boost] Re: [Config] Testing instructions for compiler vendors

2002-12-12 Thread David Abrahams
Paul Mensonides [EMAIL PROTECTED] writes: - Original Message - From: David Abrahams [EMAIL PROTECTED] Errors are not a good response here, unless of course that's done purely as an option. I was under the impression that causing errors and/or warnings was so developers could be

Re: [boost] Re: [Config] Testing instructions for compiler vendors

2002-12-12 Thread Paul Mensonides
- Original Message - From: David Abrahams [EMAIL PROTECTED] I was under the impression that causing errors and/or warnings was so developers could be reminded of some type of hack for some compiler. The macro could be conditionally be defined based on whether or not you want those

Re: [boost] Re: [Config] Testing instructions for compiler vendors

2002-12-12 Thread Paul Mensonides
- Original Message - From: Gennaro Prota [EMAIL PROTECTED] Does it only emit a warning for modulus by zero too? Yes. I don't know about Kylix but all the other flavours of Borland C++ just give W8082 for both / and %, in constant expressions (by default; of course you can even

Re: [boost] Re: [Config] Testing instructions for compiler vendors

2002-12-12 Thread David Abrahams
Paul Mensonides [EMAIL PROTECTED] writes: - Original Message - From: David Abrahams [EMAIL PROTECTED] I was under the impression that causing errors and/or warnings was so developers could be reminded of some type of hack for some compiler. The macro could be conditionally be

Re: [boost] Re: [Config] Testing instructions for compiler vendors

2002-12-12 Thread Paul Mensonides
- Original Message - From: David Abrahams [EMAIL PROTECTED] I'm not sure what you mean here. You mean overloading BOOST_WORKAROUND to cause an error (or warning) if you use BOOST_CURRENT_VERSION? That's no problem at all. I mean that #if BOOST_WORKAROUND(__SUNPRO_CC,

Re: [boost] Re: [Config] Testing instructions for compiler vendors

2002-12-12 Thread Paul Mensonides
- Original Message - From: Paul Mensonides [EMAIL PROTECTED] I'm not sure what you mean here. You mean overloading BOOST_WORKAROUND to cause an error (or warning) if you use BOOST_CURRENT_VERSION? That's no problem at all. I mean that #if

Re: [boost] Re: [Config] Testing instructions for compiler vendors

2002-12-12 Thread Paul Mensonides
- Original Message - From: David Abrahams [EMAIL PROTECTED] And, BTW, can you show us how to do it? Yes, pick which one of these syntax variants you want, and I'll implement it. [note: I'm removing all the extra wrapping parentheses here for clarity.] Normal usage would generate

[boost] Re: [Config] Testing instructions for compiler vendors

2002-12-11 Thread Gennaro Prota
On Mon, 09 Dec 2002 09:43:29 -0500, David Abrahams [EMAIL PROTECTED] wrote: John Maddock [EMAIL PROTECTED] writes: In theory the way to do that is (for example): #if defined(__BORLANDC__) ((__BORLANDC__ 0x570) || !defined(BOOST_STRICT_CONFIG)) [...] I'm going to ask a controversial

Re: [boost] Re: [Config] Testing instructions for compiler vendors

2002-12-11 Thread Paul Mensonides
- Original Message - From: Gennaro Prota [EMAIL PROTECTED] Yes. It would be nice if we could come up with an implementation of BOOST_WORKAROUND or another macro, let's say BOOST_UNVERSIONED_WORKAROUND, that generates a warning or (more realistically) an error when you invoke it with

Re: [boost] Re: [Config] Testing instructions for compiler vendors

2002-12-11 Thread David Abrahams
David Abrahams [EMAIL PROTECTED] writes: How can we say #if BOOST_WORKAROUND(__SUNPRO_CC, /*something involving 0x530 */) and have it enter the #if and warn when __SUNPRO_CC 0x530 ? It's supposed to enter the #if unconditionally, of course. -- David Abrahams

Re: [boost] Re: [Config] Testing instructions for compiler vendors

2002-12-11 Thread Paul Mensonides
- Original Message - From: David Abrahams [EMAIL PROTECTED] David Abrahams [EMAIL PROTECTED] writes: How can we say #if BOOST_WORKAROUND(__SUNPRO_CC, /*something involving 0x530 */) and have it enter the #if and warn when __SUNPRO_CC 0x530 ? It's supposed to enter the #if

Re: [boost] Re: [Config] Testing instructions for compiler vendors

2002-12-11 Thread Paul Mensonides
- Original Message - From: Gennaro Prota [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, December 11, 2002 3:20 PM Subject: [boost] Re: [Config] Testing instructions for compiler vendors On Wed, 11 Dec 2002 14:38:03 -0800, Paul Mensonides [EMAIL PROTECTED] wrote: It easy

[boost] Re: [Config] Testing instructions for compiler vendors

2002-12-06 Thread Gennaro Prota
On Thu, 05 Dec 2002 15:43:27 -0500, David Abrahams [EMAIL PROTECTED] wrote: Hmm. Well, if it's non-conforming we probably shouldn't use it. If it's just a vc bug, we could do something like #ifndef BOOST_STRICT_CONFIG # ifdef BOOST_MSVC # define BOOST_WORKAROUND(symbol, test)

Re: [boost] Re: [Config] Testing instructions for compiler vendors

2002-12-06 Thread David Abrahams
Gennaro Prota [EMAIL PROTECTED] writes: On Thu, 05 Dec 2002 15:43:27 -0500, David Abrahams [EMAIL PROTECTED] wrote: Hmm. Well, if it's non-conforming we probably shouldn't use it. If it's just a vc bug, we could do something like #ifndef BOOST_STRICT_CONFIG # ifdef BOOST_MSVC #

[boost] Re: [Config] Testing instructions for compiler vendors

2002-12-06 Thread Gennaro Prota
On Fri, 06 Dec 2002 09:05:38 -0500, David Abrahams [EMAIL PROTECTED] wrote: You may be right. How about this approach instead? [...] Sorry for the late reply. I'm certainly missing something here because I thought the solution was just to replace defined(symbol) with (0 (symbol)). No? Genny.

Re: [boost] Re: [Config] Testing instructions for compiler vendors

2002-12-06 Thread David Abrahams
Gennaro Prota [EMAIL PROTECTED] writes: On Fri, 06 Dec 2002 09:05:38 -0500, David Abrahams [EMAIL PROTECTED] wrote: You may be right. How about this approach instead? [...] Sorry for the late reply. I'm certainly missing something here because I thought the solution was just to replace