Re: [webkit-dev] Using namespace std

2012-05-17 Thread Anders Carlsson
On May 17, 2012, at 12:33 PM, Peter Kasting wrote: > On Thu, May 17, 2012 at 12:02 PM, Ryosuke Niwa wrote: > It appears to me using fully qualified names (e.g. std::max(~) at call site) > is far superior to using directive for individual symbols (e.g. using > std::max). > > It sounds in gener

Re: [webkit-dev] Using namespace std

2012-05-17 Thread Peter Kasting
On Thu, May 17, 2012 at 12:02 PM, Ryosuke Niwa wrote: > It appears to me using fully qualified names (e.g. std::max(~) at call > site) is far superior to using directive for individual symbols (e.g. using > std::max). > It sounds in general like a number of people have been in favor of this, and

Re: [webkit-dev] Using namespace std

2012-05-17 Thread Ryosuke Niwa
On Tue, May 15, 2012 at 11:46 AM, Peter Kasting wrote: > On Tue, May 15, 2012 at 11:37 AM, Ryosuke Niwa wrote: > >> On May 15, 2012 10:53 AM, "Peter Kasting" wrote: >> > Given how little of std:: we actually use (since WTF is used instead >> for most things), what about just explicitly qualifyin

Re: [webkit-dev] Using namespace std

2012-05-16 Thread Darin Adler
On May 16, 2012, at 12:47 PM, James Robinson wrote: > On Wed, May 16, 2012 at 12:04 PM, Anders Carlsson wrote: > >> FWIW, I don't think we really need using directives for the std namespace - >> the fully qualified name is short enough and I like the additional clarity >> that we're calling so

Re: [webkit-dev] Using namespace std

2012-05-16 Thread James Robinson
On Wed, May 16, 2012 at 12:04 PM, Anders Carlsson wrote: > > On May 16, 2012, at 9:31 AM, Darin Adler wrote: > > > On May 16, 2012, at 9:20 AM, Allan Sandfeld Jensen wrote: > > > >> there is another conflict which is entirely our own fault. It is > between WTF::bind and the new std::bind from C++

Re: [webkit-dev] Using namespace std

2012-05-16 Thread Jarred Nicholls
On Wed, May 16, 2012 at 3:04 PM, Anders Carlsson wrote: > > On May 16, 2012, at 9:31 AM, Darin Adler wrote: > > > On May 16, 2012, at 9:20 AM, Allan Sandfeld Jensen wrote: > > > >> there is another conflict which is entirely our own fault. It is > between WTF::bind and the new std::bind from C++

Re: [webkit-dev] Using namespace std

2012-05-16 Thread Anders Carlsson
On May 16, 2012, at 9:31 AM, Darin Adler wrote: > On May 16, 2012, at 9:20 AM, Allan Sandfeld Jensen wrote: > >> there is another conflict which is entirely our own fault. It is between >> WTF::bind and the new std::bind from C++11 > > We should find a good solution for this. I’d suggest talk

Re: [webkit-dev] Using namespace std

2012-05-16 Thread Alexey Proskuryakov
16.05.2012, в 9:20, Allan Sandfeld Jensen написал(а): > We can work around issues like this, but I would still prefer if we advised > against 'using namespace std', as seen even more clearly in the 'bind' case, > it can easily cause problems when upgrading standard libraries or compilers. Havi

Re: [webkit-dev] Using namespace std

2012-05-16 Thread Darin Adler
On May 16, 2012, at 9:20 AM, Allan Sandfeld Jensen wrote: > there is another conflict which is entirely our own fault. It is between > WTF::bind and the new std::bind from C++11 We should find a good solution for this. I’d suggest talking with Anders Carlsson about it. -- Darin ___

Re: [webkit-dev] Using namespace std

2012-05-16 Thread Allan Sandfeld Jensen
On Wednesday 16 May 2012, Allan Sandfeld Jensen wrote: > On Tuesday 15 May 2012, Darin Adler wrote: > > On May 15, 2012, at 10:04 AM, Allan Sandfeld Jensen wrote: > > > The conflict is between isinf, isnan and std::isinf and std::isnan, but > > > the conflict only exists in C++11 when constexpr ver

Re: [webkit-dev] Using namespace std

2012-05-16 Thread Allan Sandfeld Jensen
On Tuesday 15 May 2012, Darin Adler wrote: > On May 15, 2012, at 10:04 AM, Allan Sandfeld Jensen wrote: > > The conflict is between isinf, isnan and std::isinf and std::isnan, but > > the conflict only exists in C++11 when constexpr versions are > > introduced. > > We should try harder to come up

Re: [webkit-dev] Using namespace std

2012-05-16 Thread Allan Sandfeld Jensen
On Tuesday 15 May 2012, Darin Adler wrote: > On May 15, 2012, at 5:48 AM, Allan Sandfeld Jensen wrote: > > To me it seems like an odd practice, so I would like to ask what original > > rationale behind that style guideline is > > Adding a list of using declarations like "using std::min" to the top

Re: [webkit-dev] Using namespace std

2012-05-15 Thread Peter Kasting
On Tue, May 15, 2012 at 11:37 AM, Ryosuke Niwa wrote: > On May 15, 2012 10:53 AM, "Peter Kasting" wrote: > > Given how little of std:: we actually use (since WTF is used instead for > most things), what about just explicitly qualifying usages with std:: > directly? > > Can we do that if and only

Re: [webkit-dev] Using namespace std

2012-05-15 Thread Ryosuke Niwa
On May 15, 2012 10:53 AM, "Peter Kasting" wrote: > On Tue, May 15, 2012 at 9:31 AM, Darin Adler wrote: >> >> On May 15, 2012, at 5:48 AM, Allan Sandfeld Jensen wrote: >> >> > To me it seems like an odd practice, so I would like to ask what original rationale behind that style guideline is >> >> A

Re: [webkit-dev] Using namespace std

2012-05-15 Thread Peter Kasting
On Tue, May 15, 2012 at 9:31 AM, Darin Adler wrote: > On May 15, 2012, at 5:48 AM, Allan Sandfeld Jensen wrote: > > > To me it seems like an odd practice, so I would like to ask what > original rationale behind that style guideline is > > Adding a list of using declarations like "using std::min"

Re: [webkit-dev] Using namespace std

2012-05-15 Thread Darin Adler
On May 15, 2012, at 5:48 AM, Allan Sandfeld Jensen wrote: > To me it seems like an odd practice, so I would like to ask what original > rationale behind that style guideline is Adding a list of using declarations like "using std::min" to the top of each source file would give us another ongoing

[webkit-dev] Using namespace std

2012-05-15 Thread Allan Sandfeld Jensen
Hello webkit-dev I would like to bring up an issue in the style guide that I have run into and find a little odd. In my recent patch to compile WebKit using C++11 and GCC, I had to resolve a name conflict between global and std namespace. To do this you have to avoid expanding the full std nam