libs/http/include/boost/http/detail/sv.hpp
100.0% Lines (2/2)
100.0% Functions (1/1)
-% Branches (0/0)
libs/http/include/boost/http/detail/sv.hpp
| Line | Hits | Source Code |
|---|---|---|
| 1 | // | |
| 2 | // Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com) | |
| 3 | // | |
| 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying | |
| 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
| 6 | // | |
| 7 | // Official repository: https://github.com/cppalliance/http | |
| 8 | // | |
| 9 | ||
| 10 | #ifndef BOOST_HTTP_DETAIL_SV_HPP | |
| 11 | #define BOOST_HTTP_DETAIL_SV_HPP | |
| 12 | ||
| 13 | #include <boost/core/detail/string_view.hpp> | |
| 14 | ||
| 15 | namespace boost { | |
| 16 | namespace http { | |
| 17 | namespace detail { | |
| 18 | ||
| 19 | // Pulling in the UDL directly breaks in some places on MSVC, | |
| 20 | // so introduce a namespace for this purprose. | |
| 21 | namespace string_literals { | |
| 22 | inline | |
| 23 | core::string_view | |
| 24 | 9596 | operator""_sv( |
| 25 | char const* p, | |
| 26 | std::size_t n) noexcept | |
| 27 | { | |
| 28 | 9596 | return core::string_view(p, n); |
| 29 | } | |
| 30 | } // string_literals | |
| 31 | ||
| 32 | } // detail | |
| 33 | } // http | |
| 34 | } // boost | |
| 35 | ||
| 36 | #endif | |
| 37 |