Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / include / xbt / Extendable.hpp
index fd4f59a..5cf36a9 100644 (file)
@@ -24,7 +24,7 @@ class Extension {
   friend class Extendable<T>;
   constexpr Extension(std::size_t id) : id_(id) {}
 public:
-  constexpr Extension() : id_(INVALID_ID) {}
+  explicit constexpr Extension() : id_(INVALID_ID) {}
   std::size_t id() const { return id_; }
   bool valid() { return id_ != INVALID_ID; }
 };
@@ -41,7 +41,7 @@ public:
  *    with a notion of Host extended with another concept (such as mobility).
  * You could completely externalize these data with an associative map Host->EnergyHost.
  *    It would work, provided that you implement this classical feature correctly (and it would induce a little performance penalty).
- * Instead, you should add a new facet to the Host class, that happens to be Facetable.
+ * Instead, you should add a new extension to the Host class, that happens to be Extendable.
  *
  */
 template<class T>
@@ -111,7 +111,6 @@ public:
     extension_set(rank.id(), value, use_dtor);
   }
 
-public:
   // Convenience extension access when the type has a associated EXTENSION ID:
   template<class U> U* extension()           { return extension<U>(U::EXTENSION_ID); }
   template<class U> void extension_set(U* p) { extension_set<U>(U::EXTENSION_ID, p); }