forked from HowardHinnant/date
Clean up includes
Alphabetize and survey for missing and unneeded includes.
This commit is contained in:
18
date.h
18
date.h
@@ -27,20 +27,25 @@
|
|||||||
// been invented (that woud involve another several millennia of evolution).
|
// been invented (that woud involve another several millennia of evolution).
|
||||||
// We did not mean to shout.
|
// We did not mean to shout.
|
||||||
|
|
||||||
|
#include <cctype>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <climits>
|
|
||||||
#if !(__cplusplus >= 201402)
|
#if !(__cplusplus >= 201402)
|
||||||
# include <cmath>
|
# include <cmath>
|
||||||
#endif
|
#endif
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
#include <ctime>
|
||||||
|
#include <istream>
|
||||||
|
#include <ios>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <locale>
|
#include <locale>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include <ratio>
|
#include <ratio>
|
||||||
#include <type_traits>
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <cctype>
|
#include <stdexcept>
|
||||||
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
#include <type_traits>
|
||||||
|
|
||||||
namespace date
|
namespace date
|
||||||
{
|
{
|
||||||
@@ -3957,7 +3962,8 @@ format(const std::locale& loc, std::basic_string<CharT, Traits> fmt,
|
|||||||
break;
|
break;
|
||||||
case 'S':
|
case 'S':
|
||||||
case 'T':
|
case 'T':
|
||||||
if (command && !modified && ratio_less<typename Duration::period, ratio<1>>::value)
|
if (command && !modified && ratio_less<typename Duration::period,
|
||||||
|
ratio<1>>::value)
|
||||||
{
|
{
|
||||||
basic_ostringstream<CharT, Traits> os;
|
basic_ostringstream<CharT, Traits> os;
|
||||||
os.imbue(loc);
|
os.imbue(loc);
|
||||||
@@ -4065,8 +4071,8 @@ format(std::basic_string<CharT, Traits> fmt, sys_time<Duration> tp)
|
|||||||
{
|
{
|
||||||
const std::string abbrev("UTC");
|
const std::string abbrev("UTC");
|
||||||
CONSTDATA std::chrono::seconds offset{0};
|
CONSTDATA std::chrono::seconds offset{0};
|
||||||
return detail::format(std::locale{}, std::move(fmt), local_time<Duration>{tp.time_since_epoch()},
|
return detail::format(std::locale{}, std::move(fmt),
|
||||||
&abbrev, &offset);
|
local_time<Duration>{tp.time_since_epoch()}, &abbrev, &offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
// const CharT* formats
|
// const CharT* formats
|
||||||
|
11
tz.h
11
tz.h
@@ -78,22 +78,19 @@ static_assert(HAS_REMOTE_API == 0 ? AUTO_DOWNLOAD == 0 : true,
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstdint>
|
|
||||||
#include <istream>
|
#include <istream>
|
||||||
#include <locale>
|
#include <locale>
|
||||||
|
#if LAZY_INIT
|
||||||
|
# include <memory>
|
||||||
|
# include <mutex>
|
||||||
|
#endif
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include <ratio>
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#if LAZY_INIT
|
|
||||||
# include <memory>
|
|
||||||
# include <mutex>
|
|
||||||
#endif
|
|
||||||
#include <time.h>
|
|
||||||
|
|
||||||
namespace date
|
namespace date
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user