diff options
| author | Martin Hořeňovský | 2020-05-10 06:57:02 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-05-10 06:57:02 +0200 |
| commit | 094d840efe51bf1b06679d9c281e7e1513db2c81 (patch) | |
| tree | f01c235ec930c937732868aef1f361feda3c953c /src/catch2/internal | |
| parent | a595066ff9ed0af56957c48971b8a0beb941525e (diff) | |
| download | catch3-094d840efe51bf1b06679d9c281e7e1513db2c81.tar.gz | |
Cleanup SourceLineInfo implementation
Special member functions are now implicit, which should make them
both noexcept and constexpr. The `operator<<` has been made into
hidden friend as per best practices.
Diffstat (limited to 'src/catch2/internal')
| -rw-r--r-- | src/catch2/internal/catch_common.hpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/catch2/internal/catch_common.hpp b/src/catch2/internal/catch_common.hpp index 75f82d03..cc090533 100644 --- a/src/catch2/internal/catch_common.hpp +++ b/src/catch2/internal/catch_common.hpp @@ -50,19 +50,15 @@ namespace Catch { line( _line ) {} - SourceLineInfo( SourceLineInfo const& other ) = default; - SourceLineInfo& operator = ( SourceLineInfo const& ) = default; - SourceLineInfo( SourceLineInfo&& ) noexcept = default; - SourceLineInfo& operator = ( SourceLineInfo&& ) noexcept = default; - bool operator == ( SourceLineInfo const& other ) const noexcept; bool operator < ( SourceLineInfo const& other ) const noexcept; char const* file; std::size_t line; + + friend std::ostream& operator << (std::ostream& os, SourceLineInfo const& info); }; - std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ); // Bring in operator<< from global namespace into Catch namespace // This is necessary because the overload of operator<< above makes |