Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
attempt to get rid of all const_cast
[simgrid.git] / include / xbt / functional.hpp
index 5f530ea..2c7c87d 100644 (file)
@@ -43,7 +43,7 @@ public:
     std::vector<std::string> args = *args_;
     std::unique_ptr<char*[]> argv(new char*[argc + 1]);
     for (int i = 0; i != argc; ++i)
-      argv[i] = args[i].empty() ? const_cast<char*>(""): &args[i].front();
+      argv[i] = args[i].empty() ? '\0' : &args[i].front();
     argv[argc] = nullptr;
     code_(argc, argv.get());
   }
@@ -78,7 +78,7 @@ constexpr auto apply(F&& f, Tuple&& t, simgrid::xbt::index_sequence<I...>)
  *
  *  auto args = std::make_tuple(1, false);
  *  int res = apply(foo, args);
- *  @encode
+ *  @endcode
  **/
 template <class F, class Tuple>
 constexpr auto apply(F&& f, Tuple&& t)