From: Anthony Geay Date: Tue, 2 Jan 2018 15:56:27 +0000 (+0100) Subject: C++11 training X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3929a551307db114e45c2040c31069757f46ee50;p=tools%2Fmedcoupling.git C++11 training --- diff --git a/src/MEDCoupling/MEDCouplingRefCountObject.cxx b/src/MEDCoupling/MEDCouplingRefCountObject.cxx index 725c1cf19..b7e08b45a 100644 --- a/src/MEDCoupling/MEDCouplingRefCountObject.cxx +++ b/src/MEDCoupling/MEDCouplingRefCountObject.cxx @@ -75,6 +75,15 @@ const char *MEDCoupling::MEDCouplingByteOrderStr() return BIGENDIAN_STR; } +bool MEDCoupling::IsCXX11Compiled() +{ +#if __cplusplus >= 201103L + return true; +#else + return false; +#endif +} + //= std::size_t BigMemoryObject::getHeapMemorySize() const diff --git a/src/MEDCoupling/MEDCouplingRefCountObject.hxx b/src/MEDCoupling/MEDCouplingRefCountObject.hxx index 7fdf91f53..b0fb54ce1 100644 --- a/src/MEDCoupling/MEDCouplingRefCountObject.hxx +++ b/src/MEDCoupling/MEDCouplingRefCountObject.hxx @@ -64,7 +64,8 @@ namespace MEDCoupling MEDCOUPLING_EXPORT int MEDCouplingSizeOfVoidStar(); MEDCOUPLING_EXPORT bool MEDCouplingByteOrder(); MEDCOUPLING_EXPORT const char *MEDCouplingByteOrderStr(); - + MEDCOUPLING_EXPORT bool IsCXX11Compiled(); + class BigMemoryObject { public: diff --git a/src/MEDCoupling_Swig/MEDCouplingRefCountObject.i b/src/MEDCoupling_Swig/MEDCouplingRefCountObject.i index fa29e6032..031f0c380 100644 --- a/src/MEDCoupling_Swig/MEDCouplingRefCountObject.i +++ b/src/MEDCoupling_Swig/MEDCouplingRefCountObject.i @@ -62,7 +62,8 @@ namespace MEDCoupling int MEDCouplingSizeOfVoidStar(); bool MEDCouplingByteOrder(); const char *MEDCouplingByteOrderStr(); - + bool IsCXX11Compiled(); + class BigMemoryObject { public: