Re: [DynInst_API:] [PATCH 1/2] Reduce namespace pollution


Date: Mon, 25 Apr 2016 13:22:39 -0400
From: Peter Foley <pefoley2@xxxxxxxxxxx>
Subject: Re: [DynInst_API:] [PATCH 1/2] Reduce namespace pollution
On Mon, Apr 25, 2016 at 1:05 PM, Josh Stone <jistone@xxxxxxxxxx> wrote:
> On 04/23/2016 12:57 PM, Peter Foley wrote:
>> Don't unconditionally include all of namespace std
>
> I agree it's good practice avoid "using namespace std;" in API headers,
> so you don't force that on the library's users.
>
> However, IMO removing std from all the source files is needless churn.
> It's perfectly fine for a project to unconditionally use std internally
> as many projects do, and as dyninst has for a long time.
>
> Is there a real problem you're trying to solve here?
>

I figured since I was removing 'using namespace std' from the header
files, I might as well "fix" the source files that were implicitly
depending on those includes at the same time, especially since most of
them had a mix of std::<type> and just plain <type>.
That said, I have no issue with simply adding a bunch of 'using
namespace std' to the C files if that's the consensus on the best way
to go.

Thanks,

Peter
[← Prev in Thread] Current Thread [Next in Thread→]