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
--- 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
--- 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
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
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
- 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
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.
- 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
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
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
- 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
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
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
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
- 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.
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
- 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
- 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
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
- 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,
- 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
- 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
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
- 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
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
- 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
- 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
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)
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
#
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.
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
31 matches
Mail list logo