id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 8989,"asio::ip namespace issues, and proposed solution",vinnie.falco@…,chris_kohlhoff,"Given an [http://www.boost.org/doc/libs/1_54_0/doc/html/boost_asio/reference/InternetProtocol.html InternetProtocol] (usually [http://www.boost.org/doc/libs/1_54_0/doc/html/boost_asio/reference/ip__tcp.html ip::tcp]), there's no generic way to get access to these classes: {{{ class boost::asio::ip::address_v4; class boost::asio::ip::address_v6; }}} The reason is that boost::tcp::ip is a namespace and not a type. I propose adding these to the requirements for [http://www.boost.org/doc/libs/1_54_0/doc/html/boost_asio/reference/InternetProtocol.html InternetProtocol]: {{{ X::address_v4, return type boost::asio::ip::address_v4 X::address_v6, return type boost::asio::ip::address_v6 }}} This would enable template classes parameterized on [http://www.boost.org/doc/libs/1_54_0/doc/html/boost_asio/reference/InternetProtocol.html InternetProtocol] to be able to choose an address type. For example: {{{ template struct Details { typedef InternetProtocol protocol_type; typedef protocol_type::endpoint endpoint_type; // Good, with this proposal typedef protocol_type::address_v4 address_v4; endpoint_type get_endpoint () { return endpoint_type (address_v4::any (), 1053); } // Bad, the only current solution typedef boost::asio::ip::address_v4 address_v4; endpoint_type get_endpoint_bad () { return endpoint_type (address_v4::any (), 1053); } }; }}} ",Feature Requests,new,To Be Determined,asio,Boost 1.54.0,Problem,,,