Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:02:50

0001 
0002 //              Copyright Catch2 Authors
0003 // Distributed under the Boost Software License, Version 1.0.
0004 //   (See accompanying file LICENSE.txt or copy at
0005 //        https://www.boost.org/LICENSE_1_0.txt)
0006 
0007 // SPDX-License-Identifier: BSL-1.0
0008 #ifndef CATCH_SOURCE_LINE_INFO_HPP_INCLUDED
0009 #define CATCH_SOURCE_LINE_INFO_HPP_INCLUDED
0010 
0011 #include <cstddef>
0012 #include <iosfwd>
0013 
0014 namespace Catch {
0015 
0016     struct SourceLineInfo {
0017 
0018         SourceLineInfo() = delete;
0019         constexpr SourceLineInfo( char const* _file, std::size_t _line ) noexcept:
0020             file( _file ),
0021             line( _line )
0022         {}
0023 
0024         bool operator == ( SourceLineInfo const& other ) const noexcept;
0025         bool operator < ( SourceLineInfo const& other ) const noexcept;
0026 
0027         char const* file;
0028         std::size_t line;
0029 
0030         friend std::ostream& operator << (std::ostream& os, SourceLineInfo const& info);
0031     };
0032 }
0033 
0034 #define CATCH_INTERNAL_LINEINFO \
0035     ::Catch::SourceLineInfo( __FILE__, static_cast<std::size_t>( __LINE__ ) )
0036 
0037 #endif // CATCH_SOURCE_LINE_INFO_HPP_INCLUDED