From: Paolo Carlini <paolo.carlini@oracle.com>
To: "Håkon Sandsmark" <hsandsmark@gmail.com>, gcc-patches@gcc.gnu.org
Cc: Jason Merrill <jason@redhat.com>
Subject: Re: [PATCH] Fix PR c++/71546 - lambda capture fails with "was not declared in this scope"
Date: Tue, 27 Feb 2018 18:06:00 -0000 [thread overview]
Message-ID: <7778227d-1e10-4261-eada-56468c54e8ba@oracle.com> (raw)
In-Reply-To: <CAK0fzjoPVd+SDieAcGjyz3fBp3gXiCoZD0=DCGAQVSM4+L81vQ@mail.gmail.com>
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
next prev parent reply other threads:[~2018-02-27 18:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-27 16:42 Håkon Sandsmark
2018-02-27 18:06 ` Paolo Carlini [this message]
2018-02-27 18:15 ` Paolo Carlini
2018-02-27 18:51 ` Håkon Sandsmark
2018-02-27 20:29 ` Jason Merrill
2018-02-27 21:02 ` Jason Merrill
2018-02-27 21:09 ` Håkon Sandsmark
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7778227d-1e10-4261-eada-56468c54e8ba@oracle.com \
--to=paolo.carlini@oracle.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hsandsmark@gmail.com \
--cc=jason@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).