This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/83481] ICE in const-ref structured bindings.
- From: "asolokha at gmx dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 21 Jan 2018 05:16:59 +0000
- Subject: [Bug c++/83481] ICE in const-ref structured bindings.
- Auto-submitted: auto-generated
- References: <bug-83481-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83481
Arseny Solokha <asolokha at gmx dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |asolokha at gmx dot com
--- Comment #2 from Arseny Solokha <asolokha at gmx dot com> ---
The fix seems to be backported to gcc 7 branch in r255730.
Reduced testcase:
typedef int b;
namespace a {
template <typename = void> struct c;
template <typename> class d;
} // namespace a
namespace ac {
template <typename, typename, typename = a::c<>> class e;
template <typename ad, typename g> struct h {
ad ae;
g f;
};
template <typename i, typename ad, typename j, typename, typename, typename k>
class ag {
public:
using ah = k;
ah operator*();
i operator++();
template <typename l, typename ai, typename aj, typename n>
bool operator!=(ag<l, ad, j, ai, aj, n>);
};
template <typename ad, typename j, typename> class ak {
public:
class m;
using q = h<ad, j>;
using o = ag<b, ad, j, b, q, q>;
using r = ag<m, ad, j, m, q, q &>;
class ab : public o {};
class m : public r {};
ab end();
m begin();
};
template <typename ad, typename j, typename p> class e : ak<ad, j, p> {
using al = ak<ad, j, p>;
public:
using al::begin;
using al::end;
};
} // namespace ac
using s = b;
using am = class {};
struct ao;
struct ap;
using aq = a::d<ap>;
namespace {
class ar {
void as(const ao &, const aq &) { for (auto & [ a, av ] : at) {} }
ac::e<am, s> at;
};
} // namespace