https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79162
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I'm unable to reproduce this with the following, based on the llvm code. GCC
does the right thing here, so without a testcase there's nothing we can do.
#include <string>
template<typename T>
class storage {
public:
operator T() const { return {}; }
};
template<class T>
class opt : public storage<T> {
public:
explicit opt() { }
opt(const opt&) = delete;
};
opt<std::string> pf{};
class Pass {
public:
std::string filename;
Pass() {
filename = pf;
}
};
Pass p;