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_STREAM_END_STOP_HPP_INCLUDED
0009 #define CATCH_STREAM_END_STOP_HPP_INCLUDED
0010 
0011 #include <catch2/internal/catch_stringref.hpp>
0012 
0013 namespace Catch {
0014 
0015     // Use this in variadic streaming macros to allow
0016     //    << +StreamEndStop
0017     // as well as
0018     //    << stuff +StreamEndStop
0019     struct StreamEndStop {
0020         constexpr StringRef operator+() const { return StringRef(); }
0021 
0022         template <typename T>
0023         constexpr friend T const& operator+( T const& value, StreamEndStop ) {
0024             return value;
0025         }
0026     };
0027 
0028 } // namespace Catch
0029 
0030 #endif // CATCH_STREAM_END_STOP_HPP_INCLUDED