support for C++17 string_view

This commit is contained in:
Seth Hamilton 2018-02-26 10:59:59 -05:00
commit 1985c5941d
5 changed files with 13 additions and 1 deletions

3
.vs/ProjectSettings.json Normal file
View file

@ -0,0 +1,3 @@
{
"CurrentProjectSetting": "x86-Debug"
}

Binary file not shown.

Binary file not shown.

BIN
.vs/slnx.sqlite Normal file

Binary file not shown.

View file

@ -16,7 +16,16 @@ namespace SimpleWeb {
using errc = std::errc; using errc = std::errc;
using system_error = std::system_error; using system_error = std::system_error;
namespace make_error_code = std; namespace make_error_code = std;
using string_view = const std::string &; // TODO c++17: use std::string_view #ifdef __has_include
#if __has_include(<string_view>)
#include<string_view>
using string_view = std::string_view;
#define __has_string_view 1
#endif
#endif
#ifndef __has_string_view
using string_view = const std::string &;
#endif
} // namespace SimpleWeb } // namespace SimpleWeb
#else #else
#include <boost/asio.hpp> #include <boost/asio.hpp>