GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 8 / 0 / 8
Functions: 100.0% 3 / 1 / 4
Branches: -% 0 / 0 / 0

libs/url/include/boost/url/detail/string_view.hpp
Line Branch Exec Source
1 //
2 // Copyright (c) 2022 Alan de Freitas (alandefreitas@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/boostorg/url
8 //
9
10 #ifndef BOOST_URL_DETAIL_STRING_VIEW_HPP
11 #define BOOST_URL_DETAIL_STRING_VIEW_HPP
12
13 #include <boost/core/detail/string_view.hpp>
14
15 namespace boost {
16 namespace urls {
17 namespace detail {
18
19 // We use detail::to_sv(s) instead of core::string_view(s) whenever
20 // we should convert to core::string_view.
21 // This is a workaround for GCC >=8.0 <8.4
22 // See: https://github.com/boostorg/url/issues/672
23 template<class T>
24 BOOST_CXX14_CONSTEXPR
25 core::string_view
26 6821 to_sv(T const& t) noexcept
27 {
28 6821 return core::string_view(t);
29 }
30
31 } // detail
32 } // urls
33 } // boost
34
35 #endif
36