My Project
invoke.hpp
Go to the documentation of this file.
1 
28 #ifndef BSL_INVOKE_HPP
29 #define BSL_INVOKE_HPP
30 
31 #include "details/invoke_impl.hpp"
32 #include "forward.hpp"
33 
34 // TODO
35 //
36 // For some reason, the use of invoke in bsl::delegate for mfp types
37 // is not working. We should track this down to figure out what is
38 // wrong with the code as the unit tests suggest everything works
39 // as expected, but we are getting a substituion issue on the the
40 // delegate side of things.
41 //
42 
43 namespace bsl
44 {
59  template<typename FUNC, typename... TN>
60  constexpr auto
61  invoke(FUNC &&f, TN &&... tn) noexcept( // --
62  noexcept(details::invoke_impl<FUNC, TN...>::call( // --
63  bsl::forward<FUNC>(f), // --
64  bsl::forward<TN>(tn)...))) // --
65  -> decltype(details::invoke_impl<FUNC, TN...>::call( // --
66  bsl::forward<FUNC>(f), // --
67  bsl::forward<TN>(tn)...)) // --
68  { // --
69  return details::invoke_impl<FUNC, TN...>::call( // --
70  bsl::forward<FUNC>(f), // --
71  bsl::forward<TN>(tn)...); // --
72  }
73 }
74 
75 #endif
constexpr auto invoke(FUNC &&f, TN &&... tn) noexcept(//-- noexcept(details::invoke_impl< FUNC, TN... >::call(//-- bsl::forward< FUNC >(f),//-- bsl::forward< TN >(tn)...))) -> decltype(details::invoke_impl< FUNC, TN... >::call(bsl::forward< FUNC >(f), bsl::forward< TN >(tn)...))
Invokes the callable object "f" with arguments "tn".
Definition: invoke.hpp:61