2 /* { dg-do compile } */
8 enum ExternalEnum { EXTERNAL_VALUE = 2 };
10 class BadStream : public ostringstream
13 enum InternalEnum { VALUE = 0 };
14 BadStream( InternalEnum e ) {}
15 BadStream( InternalEnum e, int i ) {}
20 ( BadStream( BadStream::VALUE ) ) << "foobar" << endl;
22 BadStream((BadStream::InternalEnum)BadStream::VALUE ) << "foobar";
24 BadStream::InternalEnum in = BadStream::VALUE;
25 BadStream( in ) << "foobar";
27 BadStream( BadStream::VALUE, 0 ) << "foobar" << endl;
29 // This didn't used to compile:
30 BadStream( BadStream::VALUE ) << "foobar" << endl;