mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Remove SourceLineInfo::empty()
This commit is contained in:
parent
ac4958395c
commit
ca4c6218d4
@ -9,14 +9,6 @@ either of these is a breaking change, and thus will not happen until
|
|||||||
at least the next major release.
|
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
|
## Planned changes
|
||||||
|
|
||||||
### `CHECKED_IF` and `CHECKED_ELSE`
|
### `CHECKED_IF` and `CHECKED_ELSE`
|
||||||
|
@ -47,8 +47,8 @@ namespace Catch {
|
|||||||
struct SourceLineInfo {
|
struct SourceLineInfo {
|
||||||
|
|
||||||
SourceLineInfo() = delete;
|
SourceLineInfo() = delete;
|
||||||
SourceLineInfo( char const* _file, std::size_t _line ) noexcept
|
constexpr SourceLineInfo( char const* _file, std::size_t _line ) noexcept:
|
||||||
: file( _file ),
|
file( _file ),
|
||||||
line( _line )
|
line( _line )
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -57,7 +57,6 @@ namespace Catch {
|
|||||||
SourceLineInfo( SourceLineInfo&& ) noexcept = default;
|
SourceLineInfo( SourceLineInfo&& ) noexcept = default;
|
||||||
SourceLineInfo& operator = ( 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;
|
||||||
bool operator < ( SourceLineInfo const& other ) const noexcept;
|
bool operator < ( SourceLineInfo const& other ) const noexcept;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user