http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52018

--- Comment #2 from Daniel Krügler <daniel.kruegler at googlemail dot com> 
2012-01-31 07:33:25 UTC ---
(In reply to comment #1)
> A simple workaround is to introduce a local typename-specifier:
> 
> typedef class string c_t;
> h(c_t(42));

or use a static_cast (which has the additional advantage of not allowing a
silent reinterpret_cast):

struct string { string(int); };

enum { string };

void h(struct string);

int main() {
  h(static_cast<class string>(42));
}

Reply via email to