LCOV - code coverage report
Current view: top level - http_proto/detail - sv.hpp (source / functions) Hit Total Coverage
Test: coverage_filtered.info Lines: 2 2 100.0 %
Date: 2023-01-15 07:18:31 Functions: 1 1 100.0 %

          Line data    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_proto
       8             : //
       9             : 
      10             : #ifndef BOOST_HTTP_PROTO_DETAIL_SV_HPP
      11             : #define BOOST_HTTP_PROTO_DETAIL_SV_HPP
      12             : 
      13             : #include <boost/http_proto/string_view.hpp>
      14             : 
      15             : namespace boost {
      16             : namespace http_proto {
      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             : string_view
      24        1251 : operator"" _sv(
      25             :     char const* p,
      26             :     std::size_t n) noexcept
      27             : {
      28        1251 :     return string_view(p, n);
      29             : }
      30             : } // string_literals
      31             : 
      32             : } // detail
      33             : } // http_proto
      34             : } // boost
      35             : 
      36             : #endif

Generated by: LCOV version 1.15