[Bug c++/24847] Instantiates un-called copy constructor

2021-08-02 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24847 --- Comment #6 from Jonathan Wakely --- (In reply to Ivan Godard from comment #0) > The second constructor is intended to catch the case: "foo(foo 0, A>", i.e. to convert an instance of foo with second argument zero to a > foo with any other seco

[Bug c++/24847] Instantiates un-called copy constructor

2021-08-02 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24847 --- Comment #5 from Jonathan Wakely --- Overload resolution considers both constructors, to decide which one v(i) should use. Performing overload resolution on foo::foo(foo) will cause the instantiation of struct foo to see if there is a valid co

[Bug c++/24847] Instantiates un-called copy constructor

2021-08-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24847 --- Comment #4 from Andrew Pinski --- these compiler reject this code: GCC MSVC ICC Only clang accepts the code. All of the ones which reject it, all say the constructor is a copy constructor.

[Bug c++/24847] Instantiates un-called copy constructor

2005-11-22 Thread bangerth at dealii dot org
--- Comment #3 from bangerth at dealii dot org 2005-11-23 05:21 --- The second constructor is definitely bogus, but its mere existence does no harm. We should only perform the check for sensibility when we actually instantiate the second constructor. W. -- bangerth at dealii dot or

[Bug c++/24847] Instantiates un-called copy constructor

2005-11-14 Thread igodard at pacbell dot net
--- Comment #2 from igodard at pacbell dot net 2005-11-15 00:30 --- The original was much more sensible - and much bigger :-) Ivan -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24847

[Bug c++/24847] Instantiates un-called copy constructor

2005-11-14 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2005-11-14 19:32 --- Comeau also rejects this. I don't understand why we are trying to instantiate foo::foo(foo) except to try to match the constructor, so maybe this is invalid after all. Some one else really needs to look at this. A