Boost logo

Boost :

From: Jens Maurer (Jens.Maurer_at_[hidden])
Date: 2001-05-23 15:46:00


rwgk_at_[hidden] wrote:
>
> Is the following piece of code supposed to work with a fully
> conforming
> compiler?

Your test program does not work with Comeau C++ 4.2.45.2 in strict
mode. It does, however, work with Comeau C++ in non-strict mode.
The upcoming gcc 3.0 seems to get it right as well.

I've been able to reduce the problem with Comeau C++ to this
test program:

namespace N {
  struct A { };
  struct X {
    friend void f(A) { }
  };
}

int main()
{
  N::A a;
  f(a);
}

I'm going to send a bug report.

> Are all the compilers broken one way or another?

Some of them appear to be.

Jens Maurer


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk