Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
G
googletest
  • Project
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Chen Yisong
  • googletest
  • Repository

Switch branch/tag
  • googletest
  • googlemock
  • src
  • gmock-matchers.cc
Find file
BlameHistoryPermalink
  • Arthur O'Dwyer's avatar
    Remove all uses of GTEST_DISALLOW_{MOVE_,}ASSIGN_. · 766ac2e1
    Arthur O'Dwyer authored Apr 16, 2020
    None of these are strictly needed for correctness.
    A large number of them (maybe all of them?) trigger `-Wdeprecated`
    warnings on Clang trunk as soon as you try to use the implicitly
    defaulted (but deprecated) copy constructor of a class that has
    deleted its copy assignment operator.
    
    By declaring a deleted copy assignment operator, the old code
    also caused the move constructor and move assignment operator
    to be non-declared. This means that the old code never got move
    semantics -- "move-construction" would simply call the defaulted
    (but deprecated) copy constructor instead. With the new code,
    "move-construction" calls the defaulted move constructor, which
    I believe is what we want to happen. So this is a runtime
    performance optimization.
    
    Unfortunately we can't yet physically remove the definitions
    of these macros from gtest-port.h, because they are being used
    by other code internally at Google (according to zhangxy988).
    But no new uses should be added going forward.
    766ac2e1
gmock-matchers.cc 17.5 KB
EditWeb IDE
×

Replace gmock-matchers.cc

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.