From 41174923850db4e57b868b4d1619ba78bbe46501 Mon Sep 17 00:00:00 2001 From: Peter Heywood Date: Fri, 1 Oct 2021 15:27:11 +0100 Subject: [PATCH] Possible bugfix: Use insert not emplace fixes nvhpc + gcc9 --- src/flamegpu/model/AgentDescription.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flamegpu/model/AgentDescription.cpp b/src/flamegpu/model/AgentDescription.cpp index 4e40a37a4..a9b421e98 100644 --- a/src/flamegpu/model/AgentDescription.cpp +++ b/src/flamegpu/model/AgentDescription.cpp @@ -199,7 +199,7 @@ AgentFunctionDescription& AgentDescription::newRTCFunction(const std::string& fu func_src_str.append(func_src); } auto rtn = std::shared_ptr(new AgentFunctionData(this->agent->shared_from_this(), function_name, func_src_str, in_type_name, out_type_name, code_func_name)); - agent->functions.emplace(function_name, rtn); + agent->functions.insert({function_name, rtn}); // emplace causes nvhpc with gcc 9 to segfault return *rtn->description; } else { THROW exception::InvalidAgentFunc("Runtime agent function('%s') is missing FLAMEGPU_AGENT_FUNCTION arguments e.g. (func_name, message_input_type, message_output_type), "