[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-commits] r4681 - /trunk/getfem/src/getfem/getfem_mesh.h
From: |
andriy . andreykiv |
Subject: |
[Getfem-commits] r4681 - /trunk/getfem/src/getfem/getfem_mesh.h |
Date: |
Mon, 16 Jun 2014 15:05:38 -0000 |
Author: andrico
Date: Mon Jun 16 17:05:38 2014
New Revision: 4681
URL: http://svn.gna.org/viewcvs/getfem?rev=4681&view=rev
Log:
getfem::mesh now also inherits std::enable_shared_from_this<mesh>
(if <memory> can be included) so that mesh::shared_from_this() is available
Modified:
trunk/getfem/src/getfem/getfem_mesh.h
Modified: trunk/getfem/src/getfem/getfem_mesh.h
URL:
http://svn.gna.org/viewcvs/getfem/trunk/getfem/src/getfem/getfem_mesh.h?rev=4681&r1=4680&r2=4681&view=diff
==============================================================================
--- trunk/getfem/src/getfem/getfem_mesh.h (original)
+++ trunk/getfem/src/getfem/getfem_mesh.h Mon Jun 16 17:05:38 2014
@@ -46,6 +46,15 @@
#include "getfem_context.h"
#include "getfem_mesh_region.h"
+#if defined(__GNUC__)
+#if __cplusplus > 199711L
+#include <memory> //on GCC need to check for C++ 11
+#endif
+#else
+#include <memory> //all the others like Intel and MSVC have it
+#endif
+
+
namespace getfem {
/* Version counter for convexes. */
@@ -93,7 +102,18 @@
class mesh : virtual public dal::static_stored_object,
public bgeot::basic_mesh,
- public context_dependencies {
+ public context_dependencies
+
+//allowing mesh::shared_from_this() call
+#if defined(__GNUC__)
+#if __cplusplus > 199711L
+ , public std::enable_shared_from_this<mesh>
+#endif
+#else
+ , public std::enable_shared_from_this<mesh>
+#endif
+
+ {
public :
typedef bgeot::basic_mesh::PT_TAB PT_TAB;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Getfem-commits] r4681 - /trunk/getfem/src/getfem/getfem_mesh.h,
andriy . andreykiv <=