Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-18 09:07:52

0001 //
0002 // Copyright (c) 2022 Alan de Freitas (alandefreitas@gmail.com)
0003 //
0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 // Official repository: https://github.com/boostorg/url
0008 //
0009 
0010 #ifndef BOOST_URL_DETAIL_STRING_VIEW_HPP
0011 #define BOOST_URL_DETAIL_STRING_VIEW_HPP
0012 
0013 #include <boost/core/detail/string_view.hpp>
0014 
0015 namespace boost {
0016 namespace urls {
0017 namespace detail {
0018 
0019 // We use detail::to_sv(s) instead of core::string_view(s) whenever
0020 // we should convert to core::string_view.
0021 // This is a workaround for GCC >=8.0 <8.4
0022 // See: https://github.com/boostorg/url/issues/672
0023 template<class T>
0024 BOOST_CXX14_CONSTEXPR
0025 core::string_view
0026 to_sv(T const& t) noexcept
0027 {
0028     return core::string_view(t);
0029 }
0030 
0031 } // detail
0032 } // urls
0033 } // boost
0034 
0035 #endif