__has_include to #include <string_view>

@scturtle's suggestion
This commit is contained in:
Fangrui Song 2018-02-01 08:34:27 -08:00
parent 5b6945d909
commit 8bb5d47377

View File

@ -1,6 +1,6 @@
#if __cplusplus < 201703L #if __cplusplus >= 201703L || defined(__has_include) && __has_include(<string_view>)
#include <string_view>
#else
#define STX_NAMESPACE_NAME std #define STX_NAMESPACE_NAME std
#include "string_view.hpp" #include "string_view.hpp"
#else
#include <string_view>
#endif #endif