mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Delete Capturer's smf
As part of `-Wdeprecated-copy-dtor` sweep, I noticed that Capturer's copies are defaulted. Given that the class would likely break horribly in the event of actual copy happening, they are now deleted.
This commit is contained in:
parent
f56832d3ea
commit
2528247351
@ -62,6 +62,10 @@ namespace Catch {
|
|||||||
size_t m_captured = 0;
|
size_t m_captured = 0;
|
||||||
public:
|
public:
|
||||||
Capturer( StringRef macroName, SourceLineInfo const& lineInfo, ResultWas::OfType resultType, StringRef names );
|
Capturer( StringRef macroName, SourceLineInfo const& lineInfo, ResultWas::OfType resultType, StringRef names );
|
||||||
|
|
||||||
|
Capturer(Capturer const&) = delete;
|
||||||
|
Capturer& operator=(Capturer const&) = delete;
|
||||||
|
|
||||||
~Capturer();
|
~Capturer();
|
||||||
|
|
||||||
void captureValue( size_t index, std::string const& value );
|
void captureValue( size_t index, std::string const& value );
|
||||||
@ -90,7 +94,7 @@ namespace Catch {
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
#define INTERNAL_CATCH_CAPTURE( varName, macroName, ... ) \
|
#define INTERNAL_CATCH_CAPTURE( varName, macroName, ... ) \
|
||||||
auto varName = Catch::Capturer( macroName, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info, #__VA_ARGS__ ); \
|
Catch::Capturer varName( macroName, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info, #__VA_ARGS__ ); \
|
||||||
varName.captureValues( 0, __VA_ARGS__ )
|
varName.captureValues( 0, __VA_ARGS__ )
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
Reference in New Issue
Block a user