support for C++17 string_view
This commit is contained in:
parent
1056bd2e70
commit
1985c5941d
5 changed files with 13 additions and 1 deletions
3
.vs/ProjectSettings.json
Normal file
3
.vs/ProjectSettings.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"CurrentProjectSetting": "x86-Debug"
|
||||||
|
}
|
||||||
BIN
.vs/Simple-Web-Server/v15/Browse.VC.db
Normal file
BIN
.vs/Simple-Web-Server/v15/Browse.VC.db
Normal file
Binary file not shown.
BIN
.vs/Simple-Web-Server/v15/Browse.VC.opendb
Normal file
BIN
.vs/Simple-Web-Server/v15/Browse.VC.opendb
Normal file
Binary file not shown.
BIN
.vs/slnx.sqlite
Normal file
BIN
.vs/slnx.sqlite
Normal file
Binary file not shown.
|
|
@ -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>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue