From: Tim Song <t.canens.cpp@gmail.com>
To: "Daniel Krügler" <daniel.kruegler@gmail.com>
Cc: libstdc++@gnu.org, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] PR libstdc++/79162 ambiguity in string assignment due to string_view overload (LWG 2946)
Date: Fri, 28 Jul 2017 20:26:00 -0000 [thread overview]
Message-ID: <CAPQZVxuSmudm3+CUv5y7CQDLO0+QBuYjq2xKwWQ8ibtWxv3V9A@mail.gmail.com> (raw)
In-Reply-To: <CAGNvRgCv1Y8a6DGO=p9g8FAve1-UKf53vshqFYtdmWkDUzn8+Q@mail.gmail.com>
On Fri, Jul 28, 2017 at 4:10 PM, Daniel Krügler
<daniel.kruegler@gmail.com> wrote:
> + // Performs an implicit conversion from _Tp to __sv_type.
> + template<typename _Tp>
> + static __sv_type _S_to_string_view(const _Tp& __svt)
> + {
> + return __svt;
> + }
I might have gone for
+ static __sv_type _S_to_string_view(__sv_type __svt) noexcept
+ {
+ return __svt;
+ }
With that, we can also use noexcept(_S_to_string_view(__t)) to make up
for the absence of is_nothrow_convertible (basically the same thing I
did in LWG 2993's PR).
Tim
next parent reply other threads:[~2017-07-28 20:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAGNvRgCv1Y8a6DGO=p9g8FAve1-UKf53vshqFYtdmWkDUzn8+Q@mail.gmail.com>
2017-07-28 20:26 ` Tim Song [this message]
2017-07-28 20:29 ` Daniel Krügler
2017-07-28 20:40 ` Daniel Krügler
2017-07-30 13:01 ` Daniel Krügler
2017-08-18 18:27 ` Daniel Krügler
2017-09-04 15:48 ` Jonathan Wakely
2017-09-11 16:55 ` Jonathan Wakely
2017-09-20 15:36 ` Jonathan Wakely
2017-09-20 16:52 ` Jonathan Wakely
2017-09-20 18:00 ` Jonathan Wakely
2017-09-20 22:03 ` Jonathan Wakely
2017-07-28 20:07 Daniel Krügler
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=CAPQZVxuSmudm3+CUv5y7CQDLO0+QBuYjq2xKwWQ8ibtWxv3V9A@mail.gmail.com \
--to=t.canens.cpp@gmail.com \
--cc=daniel.kruegler@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gnu.org \
/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).