[asio] endpoint lifetime requirements with acceptor

What is the lifetime requirement of a boost::asio::ip::tcp::endpoint imposed by boost::asio::ip::tcp::acceptor. in particular it's ctor: boost::asio::ip::tcp::acceptor(boost::asio::io_service& io_, const endpoint_type&, bool); The end point is taken by const&. Is it just used, copied, or does the acceptor hold a const&? Are these sorts of issues documented? The only clue I can find is that the endpoint has a copy ctor. I can successfully construct the acceptor, passing in a temporary endpoint which is constructed in place in the acceptor's ctor, which appears to execute on both Win/MSVC8 and Mac/XCode3.2. But if I construct an endpoint further up the call stack passing it by const&, I get a runtime error. Any help appreciated. Thanks, Jeff
participants (1)
-
Jeff Flinn