X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/871107618b8c0e08361b84990c5c4a35ae4188e6..f0837fbf862b4bbf7f074314f95df143c6285cef:/include/xbt/functional.hpp 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