Hi, I see in the code some functions are passed things like boost::asio::placeholders::bytes_transferred. But I didn't understand what is going on, what are their aim? I found they are defined in placeholders.hpp as boost::arg<2>& bytes_transferred = boost::asio::placeholders::detail::placeholder<2>::get(); //and the get function as template <int Number> struct placeholder { static boost::arg<Number>& get() { static boost::arg<Number> result; return result; } }; TIA, Best regards, Ozgur (Oscar) Ozturk www.DrOzgur.com +1 (614) 805-4370
Ozgur Ozturk wrote:
Hi, I see in the code some functions are passed things like boost::asio::placeholders::bytes_transferred. But I didn't understand what is going on, what are their aim?
Please compare with, e.g., Boost.Bind's placeholders. In this case bytes_transferred is similar to _2. Hope that helps, Kind regards, Rutger
participants (2)
-
Ozgur Ozturk
-
Rutger ter Borg