/* This file is part of Telegram Desktop, the official desktop application for the Telegram messaging service. For license and copyright information please follow this link: https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #pragma once #include namespace base { template inline decltype(auto) match_method( Data &&data, Method &&method, Methods &&...methods) { if constexpr (rpl::details::is_callable_plain_v) { return std::forward(method)(std::forward(data)); } else { return match_method( std::forward(data), std::forward(methods)...); } } } // namespace base