Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
Catch::SourceLineInfo Struct Reference

#include <catch_common.h>

Collaboration diagram for Catch::SourceLineInfo:

Public Member Functions

 SourceLineInfo ()=delete
 
 SourceLineInfo (char const *_file, std::size_t _line) noexcept
 
 SourceLineInfo (SourceLineInfo const &other)=default
 
SourceLineInfooperator= (SourceLineInfo const &)=default
 
 SourceLineInfo (SourceLineInfo &&) noexcept=default
 
SourceLineInfooperator= (SourceLineInfo &&) noexcept=default
 
bool empty () const noexcept
 
bool operator== (SourceLineInfo const &other) const noexcept
 
bool operator< (SourceLineInfo const &other) const noexcept
 
 SourceLineInfo ()=delete
 
 SourceLineInfo (char const *_file, std::size_t _line) noexcept
 
 SourceLineInfo (SourceLineInfo const &other)=default
 
SourceLineInfooperator= (SourceLineInfo const &)=default
 
 SourceLineInfo (SourceLineInfo &&) noexcept=default
 
SourceLineInfooperator= (SourceLineInfo &&) noexcept=default
 
bool empty () const noexcept
 
bool operator== (SourceLineInfo const &other) const noexcept
 
bool operator< (SourceLineInfo const &other) const noexcept
 

Public Attributes

char const * file
 
std::size_t line
 

Detailed Description

Definition at line 417 of file catch.hpp.

Constructor & Destructor Documentation

◆ SourceLineInfo() [1/8]

Catch::SourceLineInfo::SourceLineInfo ( )
delete

◆ SourceLineInfo() [2/8]

Catch::SourceLineInfo::SourceLineInfo ( char const * _file,
std::size_t _line )
inlinenoexcept

Definition at line 50 of file catch_common.h.

51 : file( _file ),
52 line( _line )
53 {}

◆ SourceLineInfo() [3/8]

Catch::SourceLineInfo::SourceLineInfo ( SourceLineInfo const & other)
default

◆ SourceLineInfo() [4/8]

Catch::SourceLineInfo::SourceLineInfo ( SourceLineInfo && )
defaultnoexcept

◆ SourceLineInfo() [5/8]

Catch::SourceLineInfo::SourceLineInfo ( )
delete

◆ SourceLineInfo() [6/8]

Catch::SourceLineInfo::SourceLineInfo ( char const * _file,
std::size_t _line )
inlinenoexcept

Definition at line 420 of file catch.hpp.

421 : file( _file ),
422 line( _line )
423 {}

◆ SourceLineInfo() [7/8]

Catch::SourceLineInfo::SourceLineInfo ( SourceLineInfo const & other)
default

◆ SourceLineInfo() [8/8]

Catch::SourceLineInfo::SourceLineInfo ( SourceLineInfo && )
defaultnoexcept

Member Function Documentation

◆ empty() [1/2]

bool Catch::SourceLineInfo::empty ( ) const
noexcept

Definition at line 18 of file catch_common.cpp.

18 {
19 return file[0] == '\0';
20 }

◆ empty() [2/2]

bool Catch::SourceLineInfo::empty ( ) const
noexcept

◆ operator<() [1/2]

bool Catch::SourceLineInfo::operator< ( SourceLineInfo const & other) const
noexcept

Definition at line 24 of file catch_common.cpp.

24 {
25 // We can assume that the same file will usually have the same pointer.
26 // Thus, if the pointers are the same, there is no point in calling the strcmp
27 return line < other.line || ( line == other.line && file != other.file && (std::strcmp(file, other.file) < 0));
28 }

◆ operator<() [2/2]

bool Catch::SourceLineInfo::operator< ( SourceLineInfo const & other) const
noexcept

◆ operator=() [1/4]

SourceLineInfo & Catch::SourceLineInfo::operator= ( SourceLineInfo && )
defaultnoexcept

◆ operator=() [2/4]

SourceLineInfo & Catch::SourceLineInfo::operator= ( SourceLineInfo && )
defaultnoexcept

◆ operator=() [3/4]

SourceLineInfo & Catch::SourceLineInfo::operator= ( SourceLineInfo const & )
default

◆ operator=() [4/4]

SourceLineInfo & Catch::SourceLineInfo::operator= ( SourceLineInfo const & )
default

◆ operator==() [1/2]

bool Catch::SourceLineInfo::operator== ( SourceLineInfo const & other) const
noexcept

Definition at line 21 of file catch_common.cpp.

21 {
22 return line == other.line && (file == other.file || std::strcmp(file, other.file) == 0);
23 }

◆ operator==() [2/2]

bool Catch::SourceLineInfo::operator== ( SourceLineInfo const & other) const
noexcept

Member Data Documentation

◆ file

char const * Catch::SourceLineInfo::file

Definition at line 64 of file catch_common.h.

◆ line

std::size_t Catch::SourceLineInfo::line

Definition at line 65 of file catch_common.h.


The documentation for this struct was generated from the following files: