id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc
11003,Pointless use of using namespace std,fsmv@…,chris_kohlhoff,"There's a few lines in boost/asio/detail/impl/signal_set_service.ipp that use ""using namespace std"" inside a block for a single call to std::memset rather than just using ""std::memset."" These blocks of code are also clearly copied from each other but that might not be an issue.
Here's a patch switching those lines around:
{{{
--- boost/asio/detail/impl/signal_set_service.ipp Mon Feb 9 10:42:58 2015
+++ boost/asio/detail/impl/signal_set_service.ipp Mon Feb 9 10:44:35 2015
@@ -271,9 +271,8 @@
if (state->registration_count_[signal_number] == 0)
{
# if defined(BOOST_ASIO_HAS_SIGACTION)
- using namespace std; // For memset.
struct sigaction sa;
- memset(&sa, 0, sizeof(sa));
+ std::memset(&sa, 0, sizeof(sa));
sa.sa_handler = boost_asio_signal_handler;
sigfillset(&sa.sa_mask);
if (::sigaction(signal_number, &sa, 0) == -1)
@@ -342,9 +341,8 @@
if (state->registration_count_[signal_number] == 1)
{
# if defined(BOOST_ASIO_HAS_SIGACTION)
- using namespace std; // For memset.
struct sigaction sa;
- memset(&sa, 0, sizeof(sa));
+ std::memset(&sa, 0, sizeof(sa));
sa.sa_handler = SIG_DFL;
if (::sigaction(signal_number, &sa, 0) == -1)
# else // defined(BOOST_ASIO_HAS_SIGACTION)
@@ -396,9 +394,8 @@
if (state->registration_count_[reg->signal_number_] == 1)
{
# if defined(BOOST_ASIO_HAS_SIGACTION)
- using namespace std; // For memset.
struct sigaction sa;
- memset(&sa, 0, sizeof(sa));
+ std::memset(&sa, 0, sizeof(sa));
sa.sa_handler = SIG_DFL;
if (::sigaction(reg->signal_number_, &sa, 0) == -1)
# else // defined(BOOST_ASIO_HAS_SIGACTION)
}}}",Patches,new,To Be Determined,asio,Boost 1.57.0,Cosmetic,,,