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:
Peter Thorson
2014-11-02 19:12:16 -05:00
parent f23abe8e70
commit e1a0401d25
2 changed files with 5 additions and 1 deletions

View File

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

View File

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