mirror of
https://github.com/HowardHinnant/date.git
synced 2024-12-27 08:31:03 +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).
|
||||
// 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 <cctype>
|
||||
#include <chrono>
|
||||
@ -53,6 +60,9 @@
|
||||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#if HAS_STRING_VIEW
|
||||
# include <string_view>
|
||||
#endif
|
||||
#include <utility>
|
||||
#include <type_traits>
|
||||
|
||||
|
@ -104,14 +104,6 @@ static_assert(HAS_REMOTE_API == 0 ? AUTO_DOWNLOAD == 0 : true,
|
||||
# endif
|
||||
#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"
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1900)
|
||||
|
Loading…
x
Reference in New Issue
Block a user