Move HAS_STRING_VIEW to date.h

This commit is contained in:
Howard Hinnant 2017-11-17 11:08:39 -05:00
parent ec514101a6
commit 4832ea0ddb
2 changed files with 11 additions and 9 deletions

View File

@ -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>

View File

@ -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)