Better std::chrono autodetection for Visual Studio
This commit is contained in:
1 parent
39497aaa61
commit
dabf32a668
2 files changed
+10
-1
No files matched your search
@@ -1,4 +1,5 @@
|
||||
HEAD
|
||||
- Improvement: Better automatic std::chrono feature detection for Visual Studio
|
||||
|
||||
0.6.0
|
||||
- MINOR BREAKING TRANSPORT POLICY CHANGE: Custom transport policies will now be
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Peter Thorson. All rights reserved.
|
||||
* Copyright (c) 2015, Peter Thorson. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -39,6 +39,14 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// If we're on Visual Studio 2012 or higher and haven't explicitly disabled
|
||||
// the use of C++11 chrono header then prefer it to boost.
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1700 && !defined _WEBSOCKETPP_NO_CPP11_CHRONO_
|
||||
#ifndef _WEBSOCKETPP_CPP11_CHRONO_
|
||||
#define _WEBSOCKETPP_CPP11_CHRONO_
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _WEBSOCKETPP_CPP11_CHRONO_
|
||||
#include <chrono>
|
||||
#else
|
||||
|
||||
Reference in new issue
Block a user