[boost] Re: boost/detail/iterator.hpp update

2003-08-30 Thread David Abrahams
Brian McNamara <[EMAIL PROTECTED]> writes:

> On Thu, Aug 28, 2003 at 03:05:19PM -0400, David Abrahams wrote:
>> Douglas Gregor <[EMAIL PROTECTED]> writes:
>> > On Thursday 28 August 2003 01:23 pm, David Abrahams wrote:
>> >> The other possible option would have been to simply not give the user
>> >> a readable error message.  I'm open to opinions that I chose the
>> >> wrong balance.
>> >
>> > So we're breaking code in order to produce a better error message? This seems 
>> > like the wrong trade-off to make, especially because it means it breaks code 
>> > when users upgrade from VC6 to VC7; but we want them to upgrade! 
>> 
>> Anyone got a brilliant way to cause vc7 to print the error message?
>
> More generally, is there a generally accepted strategy for Boost
> libraries to attempt to force compilers to emit useful diagnostics?
>
> I can imagine there are a number of places where this goes on, and so if
> anyone has good domain knowledge about coercing compiliers into emitting
> useful diagnotics, it'd be great to have that written down somewhere (or
> maybe even turned into some macros possibly).
>
> (Kinda a vague idea-specification, I know.)

Unfortunately, typedef substitution makes it nearly impossible on some
compilers, namely EDGs and MSVC7.x:

   template 
   struct X
   {
typedef int& type;
   };


   template 
   struct Y
   {
typedef U* type;
   };


   template 
   struct composeYX
  : Y::type> {};


   typedef composeYX::type z;

Nowhere in that message will you see "int&" on compilers which do
typedef substitution :(

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


Re: [boost] Re: boost/detail/iterator.hpp update

2003-08-30 Thread Brian McNamara
On Thu, Aug 28, 2003 at 03:05:19PM -0400, David Abrahams wrote:
> Douglas Gregor <[EMAIL PROTECTED]> writes:
> > On Thursday 28 August 2003 01:23 pm, David Abrahams wrote:
> >> The other possible option would have been to simply not give the user
> >> a readable error message.  I'm open to opinions that I chose the
> >> wrong balance.
> >
> > So we're breaking code in order to produce a better error message? This seems 
> > like the wrong trade-off to make, especially because it means it breaks code 
> > when users upgrade from VC6 to VC7; but we want them to upgrade! 
> 
> Anyone got a brilliant way to cause vc7 to print the error message?

More generally, is there a generally accepted strategy for Boost
libraries to attempt to force compilers to emit useful diagnostics?

I can imagine there are a number of places where this goes on, and so if
anyone has good domain knowledge about coercing compiliers into emitting
useful diagnotics, it'd be great to have that written down somewhere (or
maybe even turned into some macros possibly).

(Kinda a vague idea-specification, I know.)

-- 
-Brian McNamara ([EMAIL PROTECTED])
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


[boost] Re: boost/detail/iterator.hpp update

2003-08-28 Thread Pavel Vozenilek

- Original Message - 
From: "David Abrahams" <[EMAIL PROTECTED]>
Newsgroups: gmane.comp.lib.boost.devel
Sent: Thursday, August 28, 2003 9:05 PM
Subject: Re: boost/detail/iterator.hpp update
...

> Anyone got a brilliant way to cause vc7 to print the error message?
> 
#pragma message ( "some text" )

shown during compilation, is good enough?

/Pavel


___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


[boost] Re: boost/detail/iterator.hpp update

2003-08-28 Thread David Abrahams
Douglas Gregor <[EMAIL PROTECTED]> writes:

> On Thursday 28 August 2003 01:23 pm, David Abrahams wrote:
>> The other possible option would have been to simply not give the user
>> a readable error message.  I'm open to opinions that I chose the
>> wrong balance.
>
> So we're breaking code in order to produce a better error message? 

I suppose that's correct, though I didn't realize it when I was coding
it.  I guess I'd have to opt against the code breakage.

> This seems like the wrong trade-off to make, especially because it
> means it breaks code when users upgrade from VC6 to VC7; but we want
> them to upgrade!

Not to vc7 really; it's more broken than vc6 in some ways ;-)

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


[boost] Re: boost/detail/iterator.hpp update

2003-08-28 Thread David Abrahams
Douglas Gregor <[EMAIL PROTECTED]> writes:

> On Thursday 28 August 2003 01:23 pm, David Abrahams wrote:
>> The other possible option would have been to simply not give the user
>> a readable error message.  I'm open to opinions that I chose the
>> wrong balance.
>
> So we're breaking code in order to produce a better error message? This seems 
> like the wrong trade-off to make, especially because it means it breaks code 
> when users upgrade from VC6 to VC7; but we want them to upgrade! 

Anyone got a brilliant way to cause vc7 to print the error message?

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost