#ifndef _C4_STD_STRING_FWD_HPP_ #define _C4_STD_STRING_FWD_HPP_ /** @file string_fwd.hpp */ #ifndef DOXYGEN #ifndef C4CORE_SINGLE_HEADER #include "c4/substr_fwd.hpp" #endif #include // forward declarations for std::string #if defined(__GLIBCXX__) || defined(__GLIBCPP__) #include // use the fwd header in glibcxx #elif defined(_LIBCPP_VERSION) || defined(__APPLE_CC__) #include // use the fwd header in stdlibc++ #elif defined(_MSC_VER) #include "c4/error.hpp" //! @todo is there a fwd header in msvc? namespace std { C4_SUPPRESS_WARNING_MSVC_WITH_PUSH(4643) // Forward declaring 'char_traits' in namespace std is not permitted by the C++ Standard. template struct char_traits; template class allocator; template class basic_string; using string = basic_string, allocator>; C4_SUPPRESS_WARNING_MSVC_POP } /* namespace std */ #else #error "unknown standard library" #endif namespace c4 { C4_ALWAYS_INLINE c4::substr to_substr(std::string &s) noexcept; C4_ALWAYS_INLINE c4::csubstr to_csubstr(std::string const& s) noexcept; bool operator== (c4::csubstr ss, std::string const& s); bool operator!= (c4::csubstr ss, std::string const& s); bool operator>= (c4::csubstr ss, std::string const& s); bool operator> (c4::csubstr ss, std::string const& s); bool operator<= (c4::csubstr ss, std::string const& s); bool operator< (c4::csubstr ss, std::string const& s); bool operator== (std::string const& s, c4::csubstr ss); bool operator!= (std::string const& s, c4::csubstr ss); bool operator>= (std::string const& s, c4::csubstr ss); bool operator> (std::string const& s, c4::csubstr ss); bool operator<= (std::string const& s, c4::csubstr ss); bool operator< (std::string const& s, c4::csubstr ss); size_t to_chars(c4::substr buf, std::string const& s); bool from_chars(c4::csubstr buf, std::string * s); } // namespace c4 #endif // DOXYGEN #endif // _C4_STD_STRING_FWD_HPP_