Molassembler  3.0.0
Molecule graph and conformer library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Invoke.h File Reference

Uniform callable invoke from arguments or tuple of arguments. More...

#include <boost/tuple/tuple.hpp>
#include <tuple>
#include <functional>
Include dependency graph for Invoke.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Scine::Molassembler
 Central library namespace.
 
 Scine::Molassembler::Temple
 Template shorthands, optimizers and constexpr data types.
 

Functions

template<typename HT , typename TT , typename Function >
auto Scine::Molassembler::Temple::invoke (Function &&function, const boost::tuples::cons< HT, TT > &tuple)
 Invokes a function with all values in a given boost tuple.
 
template<typename Fn , typename TupleType , std::enable_if_t< Detail::isTupleCallable< Fn, TupleType >::value, int > = 0>
auto Scine::Molassembler::Temple::invoke (Fn &&function, const TupleType &tuple)
 If a callable can be called by unpacking a supplied tuple of arguments, the tuple is called. More...
 
template<typename Fn , typename... Args, std::enable_if_t< sizeof...(Args)!=1||!Detail::isTupleCallable< Fn, Args...>::value, int > = 0>
auto Scine::Molassembler::Temple::invoke (Fn &&function, Args &&...args)
 
template<typename Functor >
auto Scine::Molassembler::Temple::make_tuple_callable (Functor &&functor)
 

Detailed Description

Uniform callable invoke from arguments or tuple of arguments.