String View: use std::string_view on C++17 (untested)
This commit is contained in:
parent
17fc9d71db
commit
00d87f8fe4
1 changed files with 11 additions and 1 deletions
|
@ -19,10 +19,20 @@ that class. */
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "global.hpp"
|
||||
|
||||
#include <boost/version.hpp>
|
||||
#include <cstdint>
|
||||
|
||||
#if BOOST_VERSION > 106100
|
||||
/** Use the standard library string_view if building with C++17. */
|
||||
#ifdef HAVE_CXX17
|
||||
|
||||
namespace utils {
|
||||
using string_view = std::string_view;
|
||||
typedef std::basic_string_view<uint8_t, std::char_traits<uint8_t>> byte_string_view;
|
||||
}
|
||||
|
||||
#elif BOOST_VERSION > 106100
|
||||
|
||||
/* Boost string_view is available, so we can just use it. */
|
||||
#include <boost/utility/string_view.hpp>
|
||||
|
|
Loading…
Add table
Reference in a new issue