This is the mail archive of the gcc-bugs@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]

[Bug c++/82745] Fails to warn on narrowing conversion by std::forward (e.g. when calling make_unique)


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.

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