On Tue, May 15, 2012 at 11:37 AM, Ryosuke Niwa <rn...@webkit.org> wrote:
> On May 15, 2012 10:53 AM, "Peter Kasting" <pkast...@chromium.org> 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 if we have conflicts? > Well, I guess we can do anything we want :). It might be nice to have a consistent rule though (much like the current style rule is consistent, if sometimes problematic). An alternative solution is to forward conflicting symbols from std to WTF > (i.e. make decisions about namespace in WTF) so that the rest of codebase > can simply use the forwarded WTF symbols instead. We could even wrap > whatever function we're using with a different name if we wanted. > >From the bugs linked in the root post of this thread, it looks like the common offenders are std::min(), std::max(), and std::numeric_limits, with a guest appearance by std::make_pair(). It seems like either solution above -- explicitly qualifying usages of these, or forwarding them through WTF -- would probably work. One factor that makes me still favor the explicit qualification is that I've been burned enough by various compilers/environments defining "min" and "max" that anything that results in pulling those symbols into the global scope makes me anxious. PK
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev