alecthomas / entityx

EntityX - A fast, type-safe C++ Entity-Component system
MIT License
2.22k stars 295 forks source link

Updated Catch library to v1.12.2 #244

Closed jarrettchisholm closed 3 years ago

jarrettchisholm commented 3 years ago

Hello,

I was having issues compiling on Ubuntu 20.04 64 bit with gcc 9.3.0. The issue seemed to be related to the Catch library.

The errors look like:

In file included from /home/jarrett/projects/entityx/entityx/help/Pool_test.cc:14: /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp: In member function ‘Catch::AssertionInfo& Catch::AssertionInfo::operator=(const Catch::AssertionInfo&)’: /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp:943:12: error: implicitly-declared ‘Catch::SourceLineInfo& Catch::SourceLineInfo::operator=(const Catch::SourceLineInfo&)’ is deprecated [-Werror=deprecated-copy] 943 | struct AssertionInfo | ^~~~~ In file included from /home/jarrett/projects/entityx/entityx/help/Pool_test.cc:14: /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp:187:9: note: because ‘Catch::SourceLineInfo’ has user-provided ‘Catch::SourceLineInfo::SourceLineInfo(const Catch::SourceLineInfo&)’ 187 | SourceLineInfo( SourceLineInfo const& other ); | ^~~~~~ In file included from /home/jarrett/projects/entityx/entityx/help/Pool_test.cc:14: /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp: In member function ‘virtual Catch::ResultAction::Value Catch::RunContext::acceptExpression(const Catch::ExpressionResultBuilder&, const Catch::AssertionInfo&)’: /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp:4834:35: note: synthesized method ‘Catch::AssertionInfo& Catch::AssertionInfo::operator=(const Catch::AssertionInfo&)’ first required here 4834 | m_lastAssertionInfo = assertionInfo; | ^~~~~ In file included from /home/jarrett/projects/entityx/entityx/help/Pool_test.cc:14: /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp: In member function ‘Catch::AssertionInfo& Catch::AssertionInfo::operator=(Catch::AssertionInfo&&)’: /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp:943:12: error: implicitly-declared ‘Catch::SourceLineInfo& Catch::SourceLineInfo::operator=(const Catch::SourceLineInfo&)’ is deprecated [-Werror=deprecated-copy] 943 | struct AssertionInfo | ^~~~~ In file included from /home/jarrett/projects/entityx/entityx/help/Pool_test.cc:14: /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp:187:9: note: because ‘Catch::SourceLineInfo’ has user-provided ‘Catch::SourceLineInfo::SourceLineInfo(const Catch::SourceLineInfo&)’ 187 | SourceLineInfo( SourceLineInfo const& other ); | ^~~~~~ In file included from /home/jarrett/projects/entityx/entityx/help/Pool_test.cc:14: /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp: In member function ‘virtual void Catch::RunContext::assertionEnded(const Catch::AssertionResult&)’: /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp:4850:171: note: synthesized method ‘Catch::AssertionInfo& Catch::AssertionInfo::operator=(Catch::AssertionInfo&&)’ first required here 4850 | m_lastAssertionInfo = AssertionInfo( "", m_lastAssertionInfo.lineInfo, "{Unknown expression after the reported line}" , m_lastAssertionInfo.resultDisposition ); | ^ /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp: In member function ‘virtual bool Catch::RunContext::sectionStarted(const Catch::SectionInfo&, Catch::Counts&)’: /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp:4864:56: error: implicitly-declared ‘Catch::SourceLineInfo& Catch::SourceLineInfo::operator=(const Catch::SourceLineInfo&)’ is deprecated [-Werror=deprecated-copy] 4864 | m_lastAssertionInfo.lineInfo = sectionInfo.lineInfo; | ^~~~ In file included from /home/jarrett/projects/entityx/entityx/help/Pool_test.cc:14: /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp:187:9: note: because ‘Catch::SourceLineInfo’ has user-provided ‘Catch::SourceLineInfo::SourceLineInfo(const Catch::SourceLineInfo&)’ 187 | SourceLineInfo( SourceLineInfo const& other ); | ^~~~~~ In file included from /home/jarrett/projects/entityx/entityx/help/Pool_test.cc:14: /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp: In member function ‘Catch::SectionInfo& Catch::SectionInfo::operator=(const Catch::SectionInfo&)’: /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp:1692:12: error: implicitly-declared ‘Catch::SourceLineInfo& Catch::SourceLineInfo::operator=(const Catch::SourceLineInfo&)’ is deprecated [-Werror=deprecated-copy] 1692 | struct SectionInfo { | ^~~ In file included from /home/jarrett/projects/entityx/entityx/help/Pool_test.cc:14: /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp:6773:5: note: because ‘Catch::SourceLineInfo’ has user-provided ‘Catch::SourceLineInfo::SourceLineInfo(const Catch::SourceLineInfo&)’ 6773 | SourceLineInfo::SourceLineInfo( SourceLineInfo const& other ) | ^~~~~~ In file included from /home/jarrett/projects/entityx/entityx/help/Pool_test.cc:14: /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp: In member function ‘Catch::SectionStats& Catch::SectionStats::operator=(const Catch::SectionStats&)’: /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp:4301:12: note: synthesized method ‘Catch::SectionInfo& Catch::SectionInfo::operator=(const Catch::SectionInfo&)’ first required here 4301 | struct SectionStats { | ^~~~ In file included from /home/jarrett/projects/entityx/entityx/help/Pool_test.cc:14: /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp: In member function ‘virtual void Catch::CumulativeReporterBase::sectionEnded(const Catch::SectionStats&)’: /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp:7067:26: note: synthesized method ‘Catch::SectionStats& Catch::SectionStats::operator=(const Catch::SectionStats&)’ first required here 7067 | node.stats = sectionStats; | ^~~~ /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp: In member function ‘Catch::XmlWriter& Catch::XmlWriter::operator=(const Catch::XmlWriter&)’: /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp:7236:35: error: implicitly-declared ‘Catch::XmlWriter::XmlWriter(const Catch::XmlWriter&)’ is deprecated [-Werror=deprecated-copy] 7236 | XmlWriter temp( other ); | ^ /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp:7235:20: note: because ‘Catch::XmlWriter’ has user-provided ‘Catch::XmlWriter& Catch::XmlWriter::operator=(const Catch::XmlWriter&)’ 7235 | XmlWriter& operator = ( XmlWriter const& other ) { | ^~~~ In file included from /home/jarrett/projects/entityx/entityx/help/Pool_test.cc:14: /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp: In instantiation of ‘_ForwardIterator std::remove_if(_ForwardIterator, _ForwardIterator, _Predicate) [with _ForwardIterator = __gnu_cxx::normal_iterator<Catch::MessageInfo, std::vector >; _Predicate = gnu_cxx::__ops::_Iter_equals_val]’: /usr/include/c++/9/bits/stl_algo.h:906:30: required from ‘_FIter std::remove(_FIter, _FIter, const _Tp&) [with _FIter = gnu_cxx::__normal_iterator<Catch::MessageInfo, std::vector >; _Tp = Catch::MessageInfo]’ /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp:4902:90: required from here /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp:1315:12: error: implicitly-declared ‘Catch::SourceLineInfo& Catch::SourceLineInfo::operator=(const Catch::SourceLineInfo&)’ is deprecated [-Werror=deprecated-copy] 1315 | struct MessageInfo { | ^~~ In file included from /home/jarrett/projects/entityx/entityx/help/Pool_test.cc:14: /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp:6773:5: note: because ‘Catch::SourceLineInfo’ has user-provided ‘Catch::SourceLineInfo::SourceLineInfo(const Catch::SourceLineInfo&)’ 6773 | SourceLineInfo::SourceLineInfo( SourceLineInfo const& other ) | ^~~~~~ In file included from /usr/include/c++/9/algorithm:62, from /home/jarrett/projects/entityx/entityx/3rdparty/catch.hpp:39, from /home/jarrett/projects/entityx/entityx/help/Pool_test.cc:14: /usr/include/c++/9/bits/stl_algo.h:871:16: note: synthesized method ‘Catch::MessageInfo& Catch::MessageInfo::operator=(Catch::MessageInfo&&)’ first required here 871 | __result = _GLIBCXX_MOVE(__first); | ^ cc1plus: all warnings being treated as errors make[2]: [CMakeFiles/pool_test.dir/build.make:63: CMakeFiles/pool_test.dir/entityx/help/Pool_test.cc.o] Error 1 make[1]: [CMakeFiles/Makefile2:117: CMakeFiles/pool_test.dir/all] Error 2 make: *** [Makefile:141: all] Error 2

Updating to the latest Catch version seemed to resolve the issue.

alecthomas commented 3 years ago

Thanks!