Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add missing constructor for simgrid::config::Flag.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 18 Apr 2018 20:32:13 +0000 (22:32 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 18 Apr 2018 20:54:09 +0000 (22:54 +0200)
include/xbt/config.hpp

index d25e1c4..5c2f098 100644 (file)
@@ -216,6 +216,13 @@ public:
     simgrid::config::bindFlag(value_, name, desc, std::move(callback));
   }
 
+  template <class F>
+  Flag(const char* name, std::initializer_list<const char*> aliases, const char* desc, T value, F callback)
+      : value_(value)
+  {
+    simgrid::config::bindFlag(value_, name, std::move(aliases), desc, std::move(callback));
+  }
+
   /* A constructor accepting a map of valid values -> their description,
    * and producing an informative error message when an invalid value is passed, or when help is passed as a value.
    */