1
0
mirror of https://github.com/catchorg/Catch2.git synced 2025-01-15 14:48:00 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Martin Hořeňovský
7c48ea6016
Do not introduce VTable when using the NonCopyable helper 2019-10-30 18:51:14 +01:00
Martin Hořeňovský
ca4c6218d4
Remove SourceLineInfo::empty() 2019-10-30 18:01:38 +01:00
6 changed files with 6 additions and 23 deletions

View File

@ -9,14 +9,6 @@ either of these is a breaking change, and thus will not happen until
at least the next major release.
## Deprecations
### SourceLineInfo::empty()
There should be no reason to ever have an empty `SourceLineInfo`, so the
method will be removed.
## Planned changes
### `CHECKED_IF` and `CHECKED_ELSE`

View File

@ -37,7 +37,4 @@ namespace Catch {
return std::string();
}
NonCopyable::NonCopyable() = default;
NonCopyable::~NonCopyable() = default;
}
} // end namespace Catch

View File

@ -38,17 +38,15 @@ namespace Catch {
NonCopyable( NonCopyable && ) = delete;
NonCopyable& operator = ( NonCopyable const& ) = delete;
NonCopyable& operator = ( NonCopyable && ) = delete;
protected:
NonCopyable();
virtual ~NonCopyable();
NonCopyable() noexcept = default;
};
struct SourceLineInfo {
SourceLineInfo() = delete;
SourceLineInfo( char const* _file, std::size_t _line ) noexcept
: file( _file ),
constexpr SourceLineInfo( char const* _file, std::size_t _line ) noexcept:
file( _file ),
line( _line )
{}
@ -57,7 +55,6 @@ namespace Catch {
SourceLineInfo( SourceLineInfo&& ) noexcept = default;
SourceLineInfo& operator = ( SourceLineInfo&& ) noexcept = default;
bool empty() const noexcept { return file[0] == '\0'; }
bool operator == ( SourceLineInfo const& other ) const noexcept;
bool operator < ( SourceLineInfo const& other ) const noexcept;

View File

@ -20,7 +20,7 @@ namespace Catch {
public:
Session();
~Session() override;
~Session();
void showHelp() const;
void libIdentify();
@ -41,7 +41,7 @@ namespace Catch {
returnCode = run();
return returnCode;
}
int run();
clara::Parser const& cli() const;

View File

@ -32,6 +32,4 @@ namespace Catch {
getMutableRegistryHub().registerStartupException();
}
}
AutoReg::~AutoReg() = default;
}

View File

@ -44,7 +44,6 @@ struct NameAndTags {
struct AutoReg : NonCopyable {
AutoReg( ITestInvoker* invoker, SourceLineInfo const& lineInfo, StringRef const& classOrMethod, NameAndTags const& nameAndTags ) noexcept;
~AutoReg();
};
} // end namespace Catch