Path: blob/master/dep/rapidyaml/include/c4/std/string_fwd.hpp
4265 views
#ifndef _C4_STD_STRING_FWD_HPP_1#define _C4_STD_STRING_FWD_HPP_23/** @file string_fwd.hpp */45#ifndef DOXYGEN67#ifndef C4CORE_SINGLE_HEADER8#include "c4/substr_fwd.hpp"9#endif1011#include <cstddef>1213// forward declarations for std::string14#if defined(__GLIBCXX__) || defined(__GLIBCPP__)15#include <bits/stringfwd.h> // use the fwd header in glibcxx16#elif defined(_LIBCPP_VERSION) || defined(__APPLE_CC__)17#include <iosfwd> // use the fwd header in stdlibc++18#elif defined(_MSC_VER)19#include "c4/error.hpp"20//! @todo is there a fwd header in msvc?21namespace std {22C4_SUPPRESS_WARNING_MSVC_WITH_PUSH(4643) // Forward declaring 'char_traits' in namespace std is not permitted by the C++ Standard.23template<typename> struct char_traits;24template<typename> class allocator;25template<typename _CharT, typename _Traits, typename _Alloc> class basic_string;26using string = basic_string<char, char_traits<char>, allocator<char>>;27C4_SUPPRESS_WARNING_MSVC_POP28} /* namespace std */29#else30#error "unknown standard library"31#endif3233namespace c4 {3435C4_ALWAYS_INLINE c4::substr to_substr(std::string &s) noexcept;36C4_ALWAYS_INLINE c4::csubstr to_csubstr(std::string const& s) noexcept;3738bool operator== (c4::csubstr ss, std::string const& s);39bool operator!= (c4::csubstr ss, std::string const& s);40bool operator>= (c4::csubstr ss, std::string const& s);41bool operator> (c4::csubstr ss, std::string const& s);42bool operator<= (c4::csubstr ss, std::string const& s);43bool operator< (c4::csubstr ss, std::string const& s);4445bool operator== (std::string const& s, c4::csubstr ss);46bool operator!= (std::string const& s, c4::csubstr ss);47bool operator>= (std::string const& s, c4::csubstr ss);48bool operator> (std::string const& s, c4::csubstr ss);49bool operator<= (std::string const& s, c4::csubstr ss);50bool operator< (std::string const& s, c4::csubstr ss);5152size_t to_chars(c4::substr buf, std::string const& s);53bool from_chars(c4::csubstr buf, std::string * s);5455} // namespace c45657#endif // DOXYGEN58#endif // _C4_STD_STRING_FWD_HPP_596061