Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[config] Remove one bindFlag() overload which does not make sense/work anymore
authorGabriel Corona <gabriel.corona@loria.fr>
Mon, 2 May 2016 14:06:03 +0000 (16:06 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Tue, 3 May 2016 07:37:43 +0000 (09:37 +0200)
include/xbt/config.hpp

index 0866cf4..65279e8 100644 (file)
@@ -86,31 +86,6 @@ void bindFlag(T& value, const char* name, const char* description)
   });
 }
 
-/** Bind a variable to configuration flag
- *
- *  <pre><code>
- *  static int x;
- *  simgrid::config::bindFlag(a, "x", [](const char* value) {
- *    return simgrid::config::parse(value);
- *  }
- *  </pre><code>
- */
-// F is a parser, F : const char* -> T
-template<class T, class F>
-typename std::enable_if<std::is_same<
-  T,
-  typename std::remove_cv< decltype(
-    std::declval<F>()(std::declval<const char*>())
-  ) >::type
->::value, void>::type
-bindFlag(T& value, const char* name, const char* description,
-  F callback)
-{
-  declareFlag(name, description, value, [&value,callback](const char* val) {
-    value = callback(val);
-  });
-}
-
 /** Bind a variable to configuration flag
  *
  *  <pre><code>