You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Klaus Ma (JIRA)" <ji...@apache.org> on 2015/11/20 07:25:11 UTC
[jira] [Commented] (MESOS-3963) Move "using
mesos::fetcher::FetcherInfo" into internal namespace in "fetcher.hpp"
[ https://issues.apache.org/jira/browse/MESOS-3963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15015303#comment-15015303 ]
Klaus Ma commented on MESOS-3963:
---------------------------------
{code}
./src/tests/mesos.hpp:using ::testing::_;
./src/tests/mesos.hpp:using ::testing::An;
./src/tests/mesos.hpp:using ::testing::DoDefault;
./src/tests/mesos.hpp:using ::testing::Invoke;
./src/tests/mesos.hpp:using ::testing::Return;
./src/tests/allocator.hpp:using ::testing::_;
./src/tests/allocator.hpp:using ::testing::An;
./src/tests/allocator.hpp:using ::testing::DoDefault;
./src/tests/allocator.hpp:using ::testing::Invoke;
./src/tests/allocator.hpp:using ::testing::Return;
./src/slave/containerizer/fetcher.hpp:using mesos::fetcher::FetcherInfo; // in global scope
./src/slave/slave.hpp:using namespace process; // in an internal namespace.
./3rdparty/libprocess/3rdparty/stout/include/stout/uuid.hpp:using id::UUID; // in namespace id, should be also addressed.
./3rdparty/libprocess/3rdparty/stout/include/stout/lambda.hpp:using std::bind;
./3rdparty/libprocess/3rdparty/stout/include/stout/lambda.hpp:using std::cref;
./3rdparty/libprocess/3rdparty/stout/include/stout/lambda.hpp:using std::function;
./3rdparty/libprocess/3rdparty/stout/include/stout/lambda.hpp:using std::ref;
./3rdparty/libprocess/3rdparty/stout/include/stout/lambda.hpp:using std::result_of;
./3rdparty/libprocess/3rdparty/stout/include/stout/lambda.hpp:using namespace std::placeholders;
{code}
> Move "using mesos::fetcher::FetcherInfo" into internal namespace in "fetcher.hpp"
> ---------------------------------------------------------------------------------
>
> Key: MESOS-3963
> URL: https://issues.apache.org/jira/browse/MESOS-3963
> Project: Mesos
> Issue Type: Bug
> Components: fetcher
> Reporter: Klaus Ma
> Priority: Minor
> Labels: newbie
>
> According to the google code style, the using should be used in internal namespace in header files. Grep the header files, only fetcher.hpp deserved a path.
> {quote}
> You may use a using-declaration anywhere in a .cc file (including in the global namespace), and in functions, methods, classes, or within internal namespaces in .h files.
> Do not use using-declarations in .h files except in explicitly marked internal-only namespaces, because anything imported into a namespace in a .h file becomes part of the public API exported by that file.
> {code}
> // OK in .cc files.
> // Must be in a function, method, internal namespace, or
> // class in .h files.
> using ::foo::bar;
> {code}
> {quote}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)