[Bug c++/85792] #include <variant> triggers Wctor-dtor-privcay
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri May 18 19:54:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85792
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|diagnostic |
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-05-18
Component|libstdc++ |c++
Ever confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The warning is bogus, because that type inherits a default constructor from its
base class (also it probably shouldn't give a warning for code in system
headers).
Minimal testcase:
template<typename T> struct A { };
template<typename T> struct B : A<T> {
using A<T>::A;
B(const B&) { }
};
It's probably related to constructors in dependent base classes not being seen
at the point the warning is given.
More information about the Gcc-bugs
mailing list