|
| template<class T > |
| using | DynarRange = boost::iterator_range< T * > |
| | A C++ range from a a dynar. More...
|
| |
| typedef std::vector< xbt_backtrace_location_t > | Backtrace |
| | A backtrace. More...
|
| |
| typedef std::string | string |
| |
| template<class T , T N> |
| using | make_integer_sequence = typename simgrid::xbt::bits::make_integer_sequence< T, N >::type |
| | A compile-time sequence of integers of the form (0,1,2,3,...,N-1) (from C++14) More...
|
| |
| template<std::size_t... Ints> |
| using | index_sequence = integer_sequence< std::size_t, Ints... > |
| | A compile-time sequence of indices (from C++14) More...
|
| |
| template<std::size_t N> |
| using | make_index_sequence = make_integer_sequence< std::size_t, N > |
| | A compile-time sequence of indices of the form (0,1,2,3,...,N-1) (from C++14) More...
|
| |
| template<class... T> |
| using | index_sequence_for = make_index_sequence< sizeof...(T)> |
| | Convert a type parameter pack into a index_sequence (from C++14) More...
|
| |
|
| template<class F > |
| xbt_automaton_propositional_symbol_t | add_proposition (xbt_automaton_t a, const char *id, F f) |
| | Add a proposition to an automaton (the C++ way) More...
|
| |
| std::vector< xbt_backtrace_location_t > | backtrace () |
| | Get the current backtrace. More...
|
| |
| std::vector< std::string > | resolveBacktrace (xbt_backtrace_location_t const *loc, std::size_t count) |
| |
| template<class T > |
| DynarRange< T > | range (xbt_dynar_t dynar) |
| | Create an iterator range representing a dynar. More...
|
| |
| template<class T > |
| xbt_dynar_t | newDeleteDynar () |
| | Dynar of T* which delete its values. More...
|
| |
| template<class F > |
| std::function< void()> | wrapMain (F code, std::vector< std::string > args) |
| |
| template<class F > |
| std::function< void()> | wrapMain (F code, int argc, const char *const argv[]) |
| |
| template<class F , class Tuple > |
| constexpr auto | apply (F &&f, Tuple &&t) -> decltype(simgrid::xbt::bits::apply(std::forward< F >(f), std::forward< Tuple >(t), simgrid::xbt::make_index_sequence< std::tuple_size< typename std::decay< Tuple >::type >::value >())) |
| | Call a functional object with the values in the given tuple (from C++17) More...
|
| |
| template<class F , class... Args> |
| auto | makeTask (F code, Args... args) -> Task< decltype(code(std::move(args)...))() > |
| |
| template<class R , class F > |
| auto | fulfillPromise (R &promise, F &&code) -> decltype(promise.set_value(code())) |
| | Execute some code and set a promise or result accordingly. More...
|
| |
| template<class P , class F > |
| auto | fulfillPromise (P &promise, F &&code) -> decltype(promise.set_value()) |
| |
| template<class P , class F > |
| void | setPromise (P &promise, F &&future) |
| | Set a promise/result from a future/result. More...
|
| |
| void | logException (e_xbt_log_priority_t priority, const char *context, std::exception const &exception) |
| | Display informations about an exception. More...
|
| |
| void | installExceptionHandler () |
| |
| std::string | string_printf (const char *fmt,...) |
| | Create a C++ string from a C-style format. More...
|
| |
| std::string | string_vprintf (const char *fmt, va_list ap) |
| | Create a C++ string from a C-style format. More...
|
| |
| const std::error_category & | errno_category () noexcept |
| | A error_category suitable to be used with errno More...
|
| |
| std::error_code | errno_code (int errnum) |
| | Create a error_code from an errno value. More...
|
| |
| std::error_code | errno_code () |
| | Create an error_code from errno (and clear it) More...
|
| |
| std::system_error | errno_error (int errnum) |
| | Create a system_error from an errno value. More...
|
| |
| std::system_error | errno_error (int errnum, const char *what) |
| |
| std::system_error | errno_error () |
| | Create a system_code from errno (and clear it) More...
|
| |
| std::system_error | errno_error (const char *what) |
| |
| std::unique_ptr< char, void(*)(void *)> | demangle (const char *name) |
| |
| static std::string | get_binary_path () |
| | Find the path of the binary file from the name found in argv. More...
|
| |
| static void | showBacktrace (std::vector< xbt_backtrace_location_t > &bt) |
| |
| static void | handler () |
| |
| std::vector< VmMap > | get_memory_map (pid_t pid) |
| |
template<class R , class F >
| auto simgrid::xbt::fulfillPromise |
( |
R & |
promise, |
|
|
F && |
code |
|
) |
| -> decltype(promise.set_value(code()))
|
Execute some code and set a promise or result accordingly.
Roughly this does:
promise.set_value(code());
but it takes care of exceptions and works with void.
We might need this when working with generic code because the trivial implementation does not work with void (before C++1z).
- Parameters
-
| code | What we want to do |
| promise | Where to want to store the result |
template<class P , class F >
| void simgrid::xbt::setPromise |
( |
P & |
promise, |
|
|
F && |
future |
|
) |
| |
|
inline |
Set a promise/result from a future/result.
Roughly this does:
promise.set_value(future);
but it takes care of exceptions and works with void.
We might need this when working with generic code because the trivial implementation does not work with void (before C++1z).
- Parameters
-
| promise | output (a valid future or a result) |
| future | input (a ready/waitable future or a valid result) |