| 1 | #ifndef BOOST_DESCRIBE_DETAIL_CX_STREQ_HPP_INCLUDED |
| 2 | #define BOOST_DESCRIBE_DETAIL_CX_STREQ_HPP_INCLUDED |
| 3 | |
| 4 | // Copyright 2021 Peter Dimov |
| 5 | // Distributed under the Boost Software License, Version 1.0. |
| 6 | // https://www.boost.org/LICENSE_1_0.txt |
| 7 | |
| 8 | #include <boost/describe/detail/config.hpp> |
| 9 | |
| 10 | #if defined(BOOST_DESCRIBE_CXX11) |
| 11 | |
| 12 | namespace boost |
| 13 | { |
| 14 | namespace describe |
| 15 | { |
| 16 | namespace detail |
| 17 | { |
| 18 | |
| 19 | constexpr bool cx_streq( char const * s1, char const * s2 ) |
| 20 | { |
| 21 | return s1[0] == s2[0] && ( s1[0] == 0 || cx_streq( s1: s1 + 1, s2: s2 + 1 ) ); |
| 22 | } |
| 23 | |
| 24 | } // namespace detail |
| 25 | } // namespace describe |
| 26 | } // namespace boost |
| 27 | |
| 28 | #endif // defined(BOOST_DESCRIBE_CXX11) |
| 29 | |
| 30 | #endif // #ifndef BOOST_DESCRIBE_DETAIL_CX_STREQ_HPP_INCLUDED |
| 31 | |