tuple-like decomposition that produces value-dependent reference
bindings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369829
91177308-0d34-0410-b5e6-
96231b3b80d8
if (E.isInvalid())
return true;
RefVD->setInit(E.get());
- RefVD->checkInitIsICE();
+ if (!E.get()->isValueDependent())
+ RefVD->checkInitIsICE();
E = S.BuildDeclarationNameExpr(CXXScopeSpec(),
DeclarationNameInfo(B->getDeclName(), Loc),
using ConstInt3 = decltype(bcr2);
}
-struct C { template<int> int get(); };
+struct C { template<int> int get() const; };
template<> struct std::tuple_size<C> { static const int value = 1; };
template<> struct std::tuple_element<0, C> { typedef int type; };
return c;
}
+constexpr C c = C();
+template<const C *p> void dependent_binding_PR40674() {
+ const auto &[c] = *p;
+ (void)c;
+}
+
struct D {
// FIXME: Emit a note here explaining why this was ignored.
template<int> struct get {};