> On Nov. 20, 2015, 2:03 p.m., Klaus Ma wrote: > > include/mesos/resources.hpp, line 41 > > <https://reviews.apache.org/r/40524/diff/2/?file=1133744#file1133744line41> > > > > Generally, we did not use `using` in header in C++; it may conflict > > with the `using` in cpp files. > > > > I grep header files in the code, some header file did not follow this > > practice. Maybe we should correct them.
Just copy the google code style about using: >>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. ``` // OK in .cc files. // Must be in a function, method, internal namespace, or // class in .h files. using ::foo::bar; ``` - Klaus ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/40524/#review107311 ----------------------------------------------------------- On Nov. 20, 2015, 1:54 p.m., Guangya Liu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/40524/ > ----------------------------------------------------------- > > (Updated Nov. 20, 2015, 1:54 p.m.) > > > Review request for mesos and Klaus Ma. > > > Bugs: MESOS-3955 > https://issues.apache.org/jira/browse/MESOS-3955 > > > Repository: mesos > > > Description > ------- > > Enabled std::string namespace for resources.hpp > > > Diffs > ----- > > include/mesos/resources.hpp ce12a26e9cc9057d6612cf2380c07be959e2990b > include/mesos/v1/resources.hpp 92db123507ba3442d475c5d3bb7e1a375cf5c1b2 > > Diff: https://reviews.apache.org/r/40524/diff/ > > > Testing > ------- > > > Thanks, > > Guangya Liu > >