From: Frederic Suter Date: Tue, 28 Jun 2016 09:59:13 +0000 (+0200) Subject: Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid X-Git-Tag: v3_14~845^2~4 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/f0837fbf862b4bbf7f074314f95df143c6285cef?hp=871107618b8c0e08361b84990c5c4a35ae4188e6 Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid --- diff --git a/include/xbt/functional.hpp b/include/xbt/functional.hpp index 99cba0d7e1..2429b5bf0a 100644 --- a/include/xbt/functional.hpp +++ b/include/xbt/functional.hpp @@ -114,11 +114,23 @@ private: struct whatever {}; // Union used for storage: +#if 0 typedef typename std::aligned_union<0, void*, std::pair, std::pair >::type TaskUnion; +#else + union TaskUnion { + void* ptr; + std::pair funcptr; + std::pair memberptr; + char any1[sizeof(std::pair)]; + char any2[sizeof(std::pair)]; + TaskUnion() {} + ~TaskUnion() {} + }; +#endif // Is F suitable for small buffer optimization? template