mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Workaround for MSVC stdlib and coroutine interaction:
If beast::Time::currentTimeMillis is first called from a coroutine launched
using boost::asio::spawn, Win32 throws an exception. This workaround calls
getCurrentTime once in main to prevent the exception.
Reference:
https://svn.boost.org/trac/boost/ticket/10657
This commit is contained in:
@@ -43,6 +43,8 @@
|
||||
#include <ripple/app/main/Application.cpp>
|
||||
#include <ripple/app/main/Main.cpp>
|
||||
|
||||
#include <beast/module/core/time/Time.h>
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ripple {
|
||||
@@ -61,6 +63,10 @@ struct ProtobufLibrary
|
||||
//
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
// Workaround for Boost.Context / Boost.Coroutine
|
||||
// https://svn.boost.org/trac/boost/ticket/10657
|
||||
(void)beast::Time::currentTimeMillis();
|
||||
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
auto constexpr gccver = (__GNUC__ * 100 * 100) +
|
||||
(__GNUC_MINOR__ * 100) +
|
||||
|
||||
Reference in New Issue
Block a user