Skip to content

Commit cdda03e

Browse files
committed
Possible bugfix: Use insert not emplace fixes nvhpc + gcc9
1 parent e6ef0c1 commit cdda03e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/flamegpu/model/AgentDescription.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ AgentFunctionDescription& AgentDescription::newRTCFunction(const std::string& fu
211211
printf("rtn %p\n", rtn.get());
212212
printf("rtn->rtc_func_name %s\n", rtn->rtc_func_name.c_str());
213213
printf("agent->functions.size() %zu\n", agent->functions.size());
214-
agent->functions.emplace(function_name, rtn);
214+
// agent->functions.emplace(function_name, rtn);
215+
agent->functions.insert({function_name, rtn}); // emplace caused nvhpc 21.7 with gcc 9 to segfault
215216
printf("%s::%d\n", __FILE__, __LINE__);
216217
return *rtn->description;
217218
} else {

0 commit comments

Comments
 (0)