mirror of
https://github.com/HowardHinnant/date.git
synced 2025-01-14 09:47:57 +08:00
Move HAS_STRING_VIEW to date.h
This commit is contained in:
parent
ec514101a6
commit
4832ea0ddb
@ -30,8 +30,15 @@
|
|||||||
// been invented (that would involve another several millennia of evolution).
|
// been invented (that would involve another several millennia of evolution).
|
||||||
// We did not mean to shout.
|
// We did not mean to shout.
|
||||||
|
|
||||||
#include <cassert>
|
#ifndef HAS_STRING_VIEW
|
||||||
|
# if __cplusplus >= 201703
|
||||||
|
# define HAS_STRING_VIEW 1
|
||||||
|
# else
|
||||||
|
# define HAS_STRING_VIEW 0
|
||||||
|
# endif
|
||||||
|
#endif // HAS_STRING_VIEW
|
||||||
|
|
||||||
|
#include <cassert>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
@ -53,6 +60,9 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#if HAS_STRING_VIEW
|
||||||
|
# include <string_view>
|
||||||
|
#endif
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
|
@ -104,14 +104,6 @@ static_assert(HAS_REMOTE_API == 0 ? AUTO_DOWNLOAD == 0 : true,
|
|||||||
# endif
|
# endif
|
||||||
#endif // HAS_DEDUCTION_GUIDES
|
#endif // HAS_DEDUCTION_GUIDES
|
||||||
|
|
||||||
#ifndef HAS_STRING_VIEW
|
|
||||||
# if __cplusplus >= 201703
|
|
||||||
# define HAS_STRING_VIEW 1
|
|
||||||
# else
|
|
||||||
# define HAS_STRING_VIEW 0
|
|
||||||
# endif
|
|
||||||
#endif // HAS_STRING_VIEW
|
|
||||||
|
|
||||||
#include "date.h"
|
#include "date.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && (_MSC_VER < 1900)
|
#if defined(_MSC_VER) && (_MSC_VER < 1900)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user