From: Arnaud Giersch Date: Tue, 6 Oct 2020 21:16:58 +0000 (+0200) Subject: Black magic. X-Git-Tag: v3.26~373 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/645080efe17d0ab008d7109252c2d2712c489f97?ds=sidebyside Black magic. Aims to fix MC+smpi on FreeBSD with Clang. --- 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_;