[Bug c++/96592] Tuple element w/ member reference to incomplete template type rejected

johnilacqua at hotmail dot com gcc-bugzilla@gcc.gnu.org
Fri Aug 14 00:19:38 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96592

John <johnilacqua at hotmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |johnilacqua at hotmail dot com

--- Comment #1 from John <johnilacqua at hotmail dot com> ---
I was about to create a bug report for what appears to be the same issue.
Here's another simple reproducer:

#include <tuple>

template <typename T>
class DependsOnT
{
public:
    DependsOnT(T&) {}
};

class Test
{
public:
    Test() : test_{*this} {}

private:
    std::tuple<DependsOnT<Test>> test_;
};

It seems to depend entirely on the reference in the constructor of DependsOnT -
if I change that to a pointer it compiles without error.


More information about the Gcc-bugs mailing list