mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
fixes guard macro for use of std::put_time
std::put_time is in the c++11 iomanip header not chrono
This commit is contained in:
@@ -28,6 +28,10 @@ HEAD
|
||||
- Improvement: Core library no longer has std::iostream as a dependency.
|
||||
std::iostream is still required for the optional iostream logging policy and
|
||||
iostream transport.
|
||||
- Bug: C++11 Chrono support was being incorrectly detected by the `boost_config`
|
||||
header. Thank you Max Dmitrichenko for reporting and a patch.
|
||||
- Bug: use of `std::put_time` is now guarded by a general 11 flag rather than
|
||||
a chrono flag. Thank you Max Dmitrichenko for reporting.
|
||||
- Compatibility: Adjust usage of std::min to be more compatible with systems
|
||||
that define a min(...) macro.
|
||||
- Compatibility: Removes unused parameters from all library, test, and example
|
||||
|
||||
@@ -133,7 +133,7 @@ private:
|
||||
static std::ostream & timestamp(std::ostream & os) {
|
||||
std::time_t t = std::time(NULL);
|
||||
std::tm* lt = std::localtime(&t);
|
||||
#ifdef _WEBSOCKETPP_CPP11_CHRONO_
|
||||
#ifdef _WEBSOCKETPP_CPP11_STL_
|
||||
return os << std::put_time(lt,"%Y-%m-%d %H:%M:%S");
|
||||
#else // Falls back to strftime, which requires a temporary copy of the string.
|
||||
char buffer[20];
|
||||
|
||||
Reference in New Issue
Block a user