で、Visual Studio 2015 libtorrent
RC でコンパイルされない次のコードを見つけました。
boost::bind( &address::is_v4,
boost::bind( &tcp::endpoint::address,
_1
)
)
== m_bind_addr.is_v4()
bind での演算子のオーバーロードの疑わしい使い方について議論するかもしれませんが、実際には、なぜそれがコンパイルされないのか疑問に思っています。エラーメッセージは次のとおりです。
C:\Projects\boost\boost/bind/bind.hpp(2003): error C2027: use of undefined type 'boost::_bi::add_cref<Pm,0>'
with
[
Pm=bool (__thiscall boost::asio::ip::address::* )(void) const
]
C:\Projects\boost\boost/bind/bind.hpp(2011): note: see reference to class template instantiation 'boost::_bi::dm_result<M (__thiscall boost::asio::ip::address::* ),A1>' being compiled
with
[
M=bool (void) const,
A1=boost::_bi::bind_t<boost::asio::ip::address,boost::_mfi::cmf0<boost::asio::ip::address,boost::asio::ip::basic_endpoint<boost::asio::ip::tcp>>,boost::_bi::list1<boost::arg<1>>>
]