On 2013-08-08 11:34 AM, Brian Smith wrote:
On Wed, Aug 7, 2013 at 6:47 PM, Ehsan Akhgari <ehsan.akhg...@gmail.com
<mailto:ehsan.akhg...@gmail.com>> wrote:
But for whatever it's worth, I think that in general, for the std
replacement code living in MFBT, it's best for us to try really hard
to match the C++ standard where it makes sense. We sometimes go
through a crazy amount of pain to do that (see my patch in bug
802806 as an example!). But if something doesn't make sense in the
C++ standard or is not fit for our needs, we should do the right
thing, depending on the case at hand.
Bug 802806 is about fixing a bug in part of mozilla::TypeTraits, which
is designed to be line std::type_traits. The reason we can't use
std::type_traits (from my reading of bug 900040) is that STLPort's
implementation is incorrect. So, I think this is a good example of where
we disagree. My position is that we should fix STLPort's implementation
for GCC 4.4 ARM Linux (maybe just backport a fixed version) and use
std::type_traits everywhere.
Question:
What, precisely, are the differences in semantics between the
similarly-named functions in mozilla:TypeTraits and std::type_traits? I
think it is hard to definitively answer this question and that's why I'd
like us to consider creating things like mozilla::TypeTraits a
last-resort option behind fixing STLPort for GCC 4.4 ARM Linux or
dropping support for old versions of compilers. (This isn't to say that
the implementation or documentation for mozilla::TypeTraits is bad; it
is very impressive. Just, I wonder if we needed to spend as much effort
on it compared to the alternatives.)
Now that I know we can modify our STLport as needed, I do agree that it
is preferred to fix that and use std::type_traits instead. At that
time, I did not have that knowledge. And we want to move on from gcc
4.4. for other reasons anyway, so perhaps there isn't anything that we
disagree on?
Cheers,
Ehsan
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform