You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
auto y = [](auto &v) -> void { v.n = 0; };// cxx11-error {{'auto' not allowed in lambda parameter}} cxx11-note {{candidate function not viable}} cxx11-note {{conversion candidate}}
friendautoT::operator()(int) const;// cxx11-error {{'auto' return without trailing return type; deduced return types are a C++14 extension}}
628
630
friend T::operatorExpectedTypeT() const;
629
631
630
632
template<typename T>
631
-
friendvoidU::operator()(T&) const;
633
+
friendvoidU::operator()(T&) const;// cxx11-error {{friend declaration of 'operator()' does not match any declaration}}
632
634
// FIXME: This should not match, as above.
633
635
template<typename T>
634
-
friend U::operator ExpectedTypeU<T>() const;
636
+
friend U::operator ExpectedTypeU<T>() const;// cxx11-error {{friend declaration of 'operator void (*)(type-parameter-0-0 &)' does not match any declaration}}
635
637
#endif
636
638
637
639
private:
638
640
int n;
639
641
};
640
642
641
643
// Should be OK: lambda's call operator is a friend.
642
-
voiduse(X &x) { y(x); }
644
+
voiduse(X &x) { y(x); }// cxx11-error {{no matching function for call to object}}
643
645
644
646
// This used to crash in return type deduction for the conversion opreator.
645
647
structA { int n; voidf() { +[](decltype(n)) {}; } };
0 commit comments