catch_case_insensitive_comparisons.hpp
1 2 // Copyright Catch2 Authors 3 // Distributed under the Boost Software License, Version 1.0. 4 // (See accompanying file LICENSE.txt or copy at 5 // https://www.boost.org/LICENSE_1_0.txt) 6 7 // SPDX-License-Identifier: BSL-1.0 8 #ifndef CATCH_CASE_INSENSITIVE_COMPARISONS_HPP_INCLUDED 9 #define CATCH_CASE_INSENSITIVE_COMPARISONS_HPP_INCLUDED 10 11 #include <catch2/internal/catch_stringref.hpp> 12 13 namespace Catch { 14 namespace Detail { 15 //! Provides case-insensitive `op<` semantics when called 16 struct CaseInsensitiveLess { 17 bool operator()( StringRef lhs, 18 StringRef rhs ) const; 19 }; 20 21 //! Provides case-insensitive `op==` semantics when called 22 struct CaseInsensitiveEqualTo { 23 bool operator()( StringRef lhs, 24 StringRef rhs ) const; 25 }; 26 27 } // namespace Detail 28 } // namespace Catch 29 30 #endif // CATCH_CASE_INSENSITIVE_COMPARISONS_HPP_INCLUDED