From 645080efe17d0ab008d7109252c2d2712c489f97 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Tue, 6 Oct 2020 23:16:58 +0200 Subject: [PATCH] Black magic. Aims to fix MC+smpi on FreeBSD with Clang. --- src/smpi/include/smpi_f2c.hpp | 2 +- src/smpi/mpi/smpi_f2c.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/smpi/include/smpi_f2c.hpp b/src/smpi/include/smpi_f2c.hpp index 5b8a55d373..7181c6b78f 100644 --- a/src/smpi/include/smpi_f2c.hpp +++ b/src/smpi/include/smpi_f2c.hpp @@ -36,7 +36,7 @@ class F2C { static char* get_key(char* key, int id); static void delete_lookup(); static std::unordered_map* lookup(); - F2C() = default; + F2C(); virtual ~F2C() = default; //Override these to handle specific values. diff --git a/src/smpi/mpi/smpi_f2c.cpp b/src/smpi/mpi/smpi_f2c.cpp index 787a182d5d..dafd94029b 100644 --- a/src/smpi/mpi/smpi_f2c.cpp +++ b/src/smpi/mpi/smpi_f2c.cpp @@ -20,6 +20,9 @@ namespace smpi{ std::unordered_map* F2C::f2c_lookup_ = nullptr; int F2C::f2c_id_ = 0; +// Keep it non trivially-constructible, or it will break MC+smpi on FreeBSD with Clang (don't ask why) +F2C::F2C() = default; + std::unordered_map* F2C::f2c_lookup() { return f2c_lookup_; -- 2.20.1