Boost C++ Libraries: Ticket #12502: boost/asio/error.hpp: fix warnings about unused static variables https://svn.boost.org/trac10/ticket/12502 <p> Please add the following pre-processor define (or similar) around the static variables in "boost/asio/error.hpp" such that the warnings about unused variables can be switched off in client code. </p> <p> Analog to boost/system/error_code.hpp: </p> <p> #ifndef BOOST_SYSTEM_NO_DEPRECATED static const boost::system::error_category&amp; system_category </p> <h1 class="section" id="boost::asio::error::get_system_category">boost::asio::error::get_system_category();</h1> <p> static const boost::system::error_category&amp; netdb_category </p> <h1 class="section" id="boost::asio::error::get_netdb_category">boost::asio::error::get_netdb_category();</h1> <p> static const boost::system::error_category&amp; addrinfo_category </p> <h1 class="section" id="boost::asio::error::get_addrinfo_category">boost::asio::error::get_addrinfo_category();</h1> <p> static const boost::system::error_category&amp; misc_category </p> <h1 class="section" id="boost::asio::error::get_misc_category">boost::asio::error::get_misc_category();</h1> <p> #endif </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12502 Trac 1.4.3 anonymous Thu, 12 Jan 2017 16:45:17 GMT <link>https://svn.boost.org/trac10/ticket/12502#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12502#comment:1</guid> <description> <p> I can reproduce it also with the latest boost 1_63_0 with gcc-5.2.0 with the following flags: -std=c++11 -O3 -Wall -W -Werror </p> <p> The warning does not appear when I don't use the -O3 flag. </p> </description> <category>Ticket</category> </item> </channel> </rss>