Skip to content

error: definition of implicit copy constructor for 'PolymorphicAction<testing::internal::ReturnVoidAction>' is deprecated because it has a user-declared copy assignment operator #142

@yurivict

Description

@yurivict
In file included from /usr/ports/math/fann/work/fann-8409b42/lib/googletest/googlemock/src/gmock-all.cc:39:
In file included from /usr/ports/math/fann/work/fann-8409b42/lib/googletest/googlemock/include/gmock/gmock.h:59:
/usr/ports/math/fann/work/fann-8409b42/lib/googletest/googlemock/include/gmock/gmock-actions.h:455:3: error: definition of implicit copy constructor for 'PolymorphicAction<testing::internal::ReturnNullAction>' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
  GTEST_DISALLOW_ASSIGN_(PolymorphicAction);
  ^
/usr/ports/math/fann/work/fann-8409b42/lib/googletest/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOW_ASSIGN_'
  void operator=(type const &) = delete
       ^
/usr/ports/math/fann/work/fann-8409b42/lib/googletest/googlemock/include/gmock/gmock-actions.h:1011:10: note: in implicit copy constructor for 'testing::PolymorphicAction<testing::internal::ReturnNullAction>' first required here
  return MakePolymorphicAction(internal::ReturnNullAction());
         ^
/usr/ports/math/fann/work/fann-8409b42/lib/googletest/googlemock/include/gmock/gmock-actions.h:455:3: error: definition of implicit copy constructor for 'PolymorphicAction<testing::internal::ReturnVoidAction>' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
  GTEST_DISALLOW_ASSIGN_(PolymorphicAction);
  ^
/usr/ports/math/fann/work/fann-8409b42/lib/googletest/googletest/include/gtest/internal/gtest-port.h:682:8: note: expanded from macro 'GTEST_DISALLOW_ASSIGN_'
  void operator=(type const &) = delete
       ^
/usr/ports/math/fann/work/fann-8409b42/lib/googletest/googlemock/include/gmock/gmock-actions.h:1016:10: note: in implicit copy constructor for 'testing::PolymorphicAction<testing::internal::ReturnVoidAction>' first required here
  return MakePolymorphicAction(internal::ReturnVoidAction());
         ^

rev. 8409b42
clang-14
FreeBSD 13.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions