|
Boost Users : |
Subject: [Boost-users] understanding placeholders
From: Ozgur Ozturk (ozgur7_at_[hidden])
Date: 2009-07-12 20:34:44
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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net