https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114680

            Bug ID: 114680
           Summary: libstdc++-v3/include/ext/mt_allocator.h:142: possible
                    performance problem ?
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Static analyser cppcheck says:

libstdc++-v3/include/ext/mt_allocator.h:142:26: performance: Function parameter
'__t' should be passed by const reference. [passedByValue]

Source code is

    _M_set_options(_Tune __t)

AFAIK sizeof( _Tune) >= 6 * sizeof( size_t) + sizeof( bool), so it might
well be worthwhile to take the advice of the static analyser.

Reply via email to