1
Fork 0
mirror of https://github.com/Jaxan/hybrid-ads.git synced 2025-04-27 15:07:45 +02:00

Workaround for the mising constructor in VS 2013

This commit is contained in:
Joshua Moerman 2015-04-08 11:17:16 +02:00
parent d8f6399260
commit 037646a16a

View file

@ -106,7 +106,9 @@ int main(int argc, char *argv[]) try {
}
}
distributions[s] = discrete_distribution<input>(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<input>(r_cache.size(), r_cache.front(), r_cache.back(), [&r_cache, &i](double) { return r_cache[i++]; });
}
return distributions;
});