Alexey Serbin has posted comments on this change.

Change subject: [iwyu] first pass
......................................................................


Patch Set 19:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/4738/19/src/kudu/client/shared_ptr.h
File src/kudu/client/shared_ptr.h:

Line 55: #include <tr1/memory> // IWYU pragma: export
> OK, will do, but then it will be necessary to include <tr1/memory> in many 
After looking at this once more, I think having these 'IWYU pragma: export' is 
a good thing.

The reasoning is the following:

1) The pragmas affect only the files which include client/shared_ptr.h.  In all 
other cases <memory> or <tr1/memory> are suggested to be included for 
{shared,weak}_ptr and enable_shared_from_this.

2) For the places where client::sp::share_ptr is used, it's not necessary to 
include both client/shared_ptr.h and <memory> /<tr1/memory>, just 
client/shared_ptr.h.  The latter is more idiomatic in such cases and requires 
less header files to include.

2) If looking at OS X compilation, removing the 'export' pragmas results in 
necessity to enclose <memory> and <tr1/memory> headers in ifdef __linux__ (or 
ifdef __APPLE__) in many files, along with having 'include 
"kudu/client/shared_ptr.h"' as well.

So, I think it's better to return the 'export' pragmas back.


-- 
To view, visit http://gerrit.cloudera.org:8080/4738
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6923091be36a1c03fac34dd73e6b17e17ac9ceaa
Gerrit-PatchSet: 19
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <danburk...@apache.org>
Gerrit-Reviewer: Jean-Daniel Cryans <jdcry...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>
Gerrit-HasComments: Yes

Reply via email to