This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR c++/71546 - lambda capture fails with "was not declared in this scope"


Hi,

I only have a simple comment about the testcase:

On 27/02/2018 17:42, Håkon Sandsmark wrote:
+++ gcc/testsuite/g++.dg/cpp1y/pr71546.C
@@ -0,0 +1,11 @@
+// PR c++/71546
+// { dg-do compile { target c++14 } }
+// { dg-options "" }
+
+#include <memory>
+
+int main()
+{
+  int x1;
+  [e = std::make_shared <int> (), x1]() {};
+}
Instead of including the whole <memory>, shall we use something like:

namespace std { template<typename> struct make_shared { }; }

int main()
{
  int x1;
  [e = std::make_shared <int> (), x1]() {};
}

???

Thanks,
Paolo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]