This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/29188] undocumented extension with ambiguous between conversion function/constructor. related to const

------- Comment #3 from bangerth at dealii dot org  2006-10-10 03:44 -------
Confirmed. Not a useful extension because confusing:
struct A;

struct B {
    B (const A&);

struct A {
    operator B() const;

A a;
B b1 =  a;    // xpass
g/x> /home/bangerth/bin/gcc-4.2-pre/bin/c++ -c
g/x> /home/bangerth/bin/gcc-4.2-pre/bin/c++ -c -pedantic error: conversion from ‘A’ to ‘B’ is ambiguous note: candidates are: A::operator B() const note:                 B::B(const A&)


bangerth at dealii dot org changed:

           What    |Removed                     |Added
                 CC|                            |bangerth at dealii dot org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-10-10 03:44:52
               date|                            |

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]