|
Boost : |
From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2003-01-08 12:06:15
----- Original Message -----
From: "Paul Mensonides" <pmenso57_at_[hidden]>
> Actually, this seems to be a bug in Comeau C++:
>
> #include <iostream>
> #include <typeinfo>
>
> struct A {
> enum type { x, y };
> };
>
> template<int> struct B { };
>
> template<class T> inline T operator+(T lhs, T rhs) {
> throw 0;
> }
>
> int main() try {
> std::cout
> << typeid( B<A::x + A::y> ).name() << &std::endl
> // ^
> // Comeau C++ doesn't flag this,
> // but I think it should.
> // Am I wrong here?
> << A::x + A::y << &std::endl;
> }
> catch (int) {
> std::cout << "template operator used" << &std::endl;
> return 0;
> }
FYI, I submitted this bug to the EDG guys.
Paul Mensonides
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk