Skip to content

Reduce boost namespace pollution#5513

Merged
laanwj merged 3 commits intobitcoin:masterfrom
theuni:namespace
Jan 6, 2015
Merged

Reduce boost namespace pollution#5513
laanwj merged 3 commits intobitcoin:masterfrom
theuni:namespace

Conversation

@theuni
Copy link
Copy Markdown
Member

@theuni theuni commented Dec 19, 2014

Should fix #3483, as well as being a good practice in general. The second commit changes a bit of code, so it's not lumped in with the rest. The others should be semantic changes only.

After this, there are only 2 users of "using namespace boost::foo" left, and those were left in because they're very wordy otherwise.

@zander
Copy link
Copy Markdown

zander commented Dec 29, 2014

I really like the first and the last commit, they look good to me. I personally would reject the middle commit that touches the unit test (see comment there).

@jonasschnelli
Copy link
Copy Markdown
Contributor

IMO: this makes the code more readable and i also see this as a good practice.
ACK (reviewed, compiled, make check).

@laanwj
Copy link
Copy Markdown
Member

laanwj commented Jan 2, 2015

Looks good to me. I'm not a big fan of 'using namespace XXX' on a global level either. If it makes things too wordy you can always use them at a function level.

Needs rebase though.

@theuni
Copy link
Copy Markdown
Member Author

theuni commented Jan 2, 2015

rebased

theuni added 3 commits January 2, 2015 15:12
Standard functions are even simpler
A few boost::asio were left around because they're very wordy otherwise.
@sipa
Copy link
Copy Markdown
Member

sipa commented Jan 4, 2015

Untested ACK.

@zander Your comment on the second commit is lost due to the rebase.

@theuni
Copy link
Copy Markdown
Member Author

theuni commented Jan 5, 2015

Pre-rebase comments can be seen here:
theuni@705292e#commitcomment-9105866

@laanwj
Copy link
Copy Markdown
Member

laanwj commented Jan 6, 2015

ACK, no binary changes in bitcoind

230b275c285433955d58623a3d388f7b89839003c359773876932a5cb7686a5e  bitcoind.856e862.stripped
230b275c285433955d58623a3d388f7b89839003c359773876932a5cb7686a5e  bitcoind.f55c5e9.stripped

@laanwj laanwj merged commit 856e862 into bitcoin:master Jan 6, 2015
laanwj added a commit that referenced this pull request Jan 6, 2015
856e862 namespace: drop most boost namespaces and a few header cleanups (Cory Fields)
9b1ab86 namespace: drop boost::assign altogether here (Cory Fields)
a324199 namespace: remove boost namespace pollution (Cory Fields)
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

boost, reference to ‘int64_t’ is ambiguous

5 participants