Alien-catch

 view release on metacpan or  search on metacpan

src/catch.hpp  view on Meta::CPAN

429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
namespace Catch {
 
    class StringData;
 
    /// A non-owning string class (similar to the forthcoming std::string_view)
    /// Note that, because a StringRef may be a substring of another string,
    /// it may not be null terminated. c_str() must return a null terminated
    /// string, however, and so the StringRef will internally take ownership
    /// (taking a copy), if necessary. In theory this ownership is not externally
    /// visible - but it does mean (substring) StringRefs should not be shared between
    /// threads.
    class StringRef {
    public:
        using size_type = std::size_t;
 
    private:
        friend struct StringRefTestAccess;
 
        char const* m_start;
        size_type m_size;

src/catch.hpp  view on Meta::CPAN

8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
{}
 
bool MessageInfo::operator==( MessageInfo const& other ) const {
    return sequence == other.sequence;
}
 
bool MessageInfo::operator<( MessageInfo const& other ) const {
    return sequence < other.sequence;
}
 
// This may need protecting if threading support is added
unsigned int MessageInfo::globalCount = 0;
 
////////////////////////////////////////////////////////////////////////////
 
Catch::MessageBuilder::MessageBuilder( StringRef const& macroName,
                                       SourceLineInfo const& lineInfo,
                                       ResultWas::OfType type )
    :m_info(macroName, lineInfo, type) {}
 
////////////////////////////////////////////////////////////////////////////



( run in 0.231 second using v1.01-cache-2.11-cpan-ec4f86ec37b )