Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace detail
- {
- template<typename F, typename A>
- void for_each(const F& f, A&& value)
- {
- f(std::forward<A>(value));
- }
- template<typename F, typename A, typename... Args>
- void for_each(const F& f, A&& value, Args&&... args)
- {
- for_each(f, std::forward<A>(value));
- for_each(f, std::forward<Args>(args)...);
- }
- }
- template<typename F, typename... Args>
- void for_each(const F& f, Args&&... args)
- {
- detail::for_each(f, std::forward<Args>(args)...);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement