From 037646a16a7415146fe8ade2be9adaad9f49507d Mon Sep 17 00:00:00 2001 From: Joshua Moerman Date: Wed, 8 Apr 2015 11:17:16 +0200 Subject: [PATCH] Workaround for the mising constructor in VS 2013 --- src/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 4b8f414..8c0eabd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -106,7 +106,9 @@ int main(int argc, char *argv[]) try { } } - distributions[s] = discrete_distribution(begin(r_cache), end(r_cache)); + // VS 2013 is missing some c++11 support: http://stackoverflow.com/questions/21959404/initialising-stddiscrete-distribution-in-vs2013 + size_t i = 0; + distributions[s] = discrete_distribution(r_cache.size(), r_cache.front(), r_cache.back(), [&r_cache, &i](double) { return r_cache[i++]; }); } return distributions; });