This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/82745] Fails to warn on narrowing conversion by std::forward (e.g. when calling make_unique)
- From: "helge at penne dot no" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 27 Oct 2017 13:06:35 +0000
- Subject: [Bug c++/82745] Fails to warn on narrowing conversion by std::forward (e.g. when calling make_unique)
- Auto-submitted: auto-generated
- References: <bug-82745-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82745
helge at penne dot no changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Fails to warn on narrowing |Fails to warn on narrowing
|conversion when using |conversion by std::forward
|make_unique |(e.g. when calling
| |make_unique)
--- Comment #1 from helge at penne dot no ---
Some further experiments show that the compiler also fails to detect narrowing
conversions in calls to std::vector::emplace_back and std::map::emplace. It
seems fair to guess that anything that uses perfect forwarding and std::forward
is suspect.