From b04f0b0c9ea9582ebe8712e8c163537b8c21a27d Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 21 Sep 2017 15:58:02 +1000 Subject: [PATCH] random: threadlocal generator should be inline this avoids multiply defined symbols --- random.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/random.hpp b/random.hpp index e4b97490..9c5f65ea 100644 --- a/random.hpp +++ b/random.hpp @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * Copyright 2016 Danny Robson + * Copyright 2016-2017 Danny Robson */ #ifndef CRUFT_UTIL_RANDOM_HPP @@ -24,7 +24,7 @@ namespace util::random { /////////////////////////////////////////////////////////////////////////// /// return correctly initialised thread-local generator of an unspecified, /// but not entirely useless, type. ie, not LCG. - auto& + inline auto& generator (void) { static thread_local std::mt19937_64 gen { std::random_device {}() };