Skip to content

Commit

Permalink
std::chrono::seconds constructor is not constexpr in VC
Browse files Browse the repository at this point in the history
  • Loading branch information
windoze committed May 27, 2015
1 parent f019783 commit 1ec06b4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/fibio/http/server/server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@

namespace fibio { namespace http {
constexpr unsigned DEFAULT_MAX_KEEP_ALIVE=100;
#if defined(_WIN32)
// NOTE: std::chrono::seconds constructor is not constexpr in VC
static const timeout_type DEFAULT_TIMEOUT=std::chrono::seconds(60);
static const timeout_type NO_TIMEOUT=std::chrono::seconds(0);
#else
constexpr timeout_type DEFAULT_TIMEOUT=std::chrono::seconds(60);
constexpr timeout_type NO_TIMEOUT=std::chrono::seconds(0);
#endif

struct server_error : std::runtime_error {
server_error(http_status_code c)
Expand Down

0 comments on commit 1ec06b4

Please sign in to comment.