AUI Framework  master
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
aui::parameter_pack Namespace Reference

Detailed Description#

without with
template<typename Arg, typename... Args> void helperFunc(Arg&& arg, Args&&... args) {
   // do something with arg
   std::cout << std::forward<Arg>(arg) << std::endl;
   if constexpr (sizeof...(args) > 0) {
       helperFunc(std::forward<Args>(args)...); // continue iteration
   }
}
template<typename... Args> void yourFunc(Args&&... args) {
    helperFunc(std::forward<Args>(args)...);
}
API_AUI_CORE const ACommandLineArgs & args() noexcept
  
template<typename... Args> void yourFunc(Args&&... args) {
    aui::parameter_pack::for_each([](auto&& i) {
        // do something with arg
        std::cout << i << " ";
    }, std::forward<Args>(args)...);
}

Typedefs#

template<typename... Types>
using first = typename impl::first<Types...>::type