123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- #ifndef BOOST_BEAST_STRING_PARAM_HPP
- #define BOOST_BEAST_STRING_PARAM_HPP
- #if defined(BOOST_BEAST_ALLOW_DEPRECATED) && !defined(BOOST_BEAST_DOXYGEN)
- #include <boost/beast/core/detail/config.hpp>
- #include <boost/beast/core/string.hpp>
- #include <boost/beast/core/static_string.hpp>
- #include <boost/beast/core/detail/static_ostream.hpp>
- #include <boost/optional.hpp>
- namespace boost {
- namespace beast {
- class string_param
- {
- string_view sv_;
- char buf_[128];
- boost::optional<detail::static_ostream> os_;
- template<class T>
- typename std::enable_if<
- std::is_integral<T>::value>::type
- print(T const&);
- template<class T>
- typename std::enable_if<
- ! std::is_integral<T>::value &&
- ! std::is_convertible<T, string_view>::value
- >::type
- print(T const&);
- void
- print(string_view);
- template<class T>
- typename std::enable_if<
- std::is_integral<T>::value>::type
- print_1(T const&);
- template<class T>
- typename std::enable_if<
- ! std::is_integral<T>::value>::type
- print_1(T const&);
- void
- print_n()
- {
- }
- template<class T0, class... TN>
- void
- print_n(T0 const&, TN const&...);
- template<class T0, class T1, class... TN>
- void
- print(T0 const&, T1 const&, TN const&...);
- public:
-
- string_param(string_param const&) = delete;
-
- string_param& operator=(string_param const&) = delete;
-
- template<class... Args>
- string_param(Args const&... args);
-
- string_view
- str() const
- {
- return sv_;
- }
-
- operator string_view const() const
- {
- return sv_;
- }
- };
- }
- }
- #include <boost/beast/core/impl/string_param.hpp>
- #endif
- #endif
|