Add [specref] references to all the section-comments in TypeTraits.h, to further ease reading/searching. Followup to bug 853988, suggested by froydnj
authorJeff Walden <jwalden@mit.edu>
Mon, 25 Mar 2013 12:05:19 -0700
changeset 126147 669d96cdd9ef98130732d6cb01c178f1077efcf2
parent 126146 14fd773be3cfe22c32db79598c76931efe6b6a3b
child 126148 9980f5c81587047f03eaa815f8e7c5965f327d6b
push id25300
push userjwalden@mit.edu
push dateMon, 25 Mar 2013 19:06:34 +0000
treeherdermozilla-inbound@669d96cdd9ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs853988
milestone22.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Add [specref] references to all the section-comments in TypeTraits.h, to further ease reading/searching. Followup to bug 853988, suggested by froydnj
mfbt/TypeTraits.h
--- a/mfbt/TypeTraits.h
+++ b/mfbt/TypeTraits.h
@@ -12,17 +12,17 @@
  * <type_traits> header.  Don't add traits not in that header!  When all
  * platforms provide that header, we can convert all users and remove this one.
  */
 
 #include <wchar.h>
 
 namespace mozilla {
 
-/* 20.9.3 Helper classes */
+/* 20.9.3 Helper classes [meta.help] */
 
 /**
  * Helper class used as a base for various type traits, exposed publicly
  * because <type_traits> exposes it as well.
  */
 template<typename T, T Value>
 struct IntegralConstant
 {
@@ -30,19 +30,19 @@ struct IntegralConstant
     typedef T ValueType;
     typedef IntegralConstant<T, Value> Type;
 };
 
 /** Convenient aliases. */
 typedef IntegralConstant<bool, true> TrueType;
 typedef IntegralConstant<bool, false> FalseType;
 
-/* 20.9.4 Unary type traits */
+/* 20.9.4 Unary type traits [meta.unary] */
 
-/* 20.9.4.1 Primary type categories */
+/* 20.9.4.1 Primary type categories [meta.unary.cat] */
 
 /**
  * IsPointer determines whether a type is a pointer type (but not a pointer-to-
  * member type).
  *
  * mozilla::IsPointer<struct S*>::value is true;
  * mozilla::IsPointer<int**>::value is true;
  * mozilla::IsPointer<void (*)(void)>::value is true;
@@ -50,19 +50,19 @@ typedef IntegralConstant<bool, false> Fa
  * mozilla::IsPointer<struct S>::value is false.
  */
 template<typename T>
 struct IsPointer : FalseType {};
 
 template<typename T>
 struct IsPointer<T*> : TrueType {};
 
-/* 20.9.4.2 Composite type traits */
+/* 20.9.4.2 Composite type traits [meta.unary.comp] */
 
-/* 20.9.4.3 Type properties */
+/* 20.9.4.3 Type properties [meta.unary.prop] */
 
 /**
  * Traits class for identifying POD types.  Until C++11 there's no automatic
  * way to detect PODs, so for the moment this is done manually.  Users may
  * define specializations of this class that inherit from mozilla::TrueType and
  * mozilla::FalseType (or equivalently mozilla::IntegralConstant<bool, true or
  * false>, or conveniently from mozilla::IsPod for composite types) as needed to
  * ensure correct IsPod behavior.
@@ -82,19 +82,19 @@ template<> struct IsPod<unsigned long>  
 template<> struct IsPod<long long>          : TrueType {};
 template<> struct IsPod<unsigned long long> : TrueType {};
 template<> struct IsPod<bool>               : TrueType {};
 template<> struct IsPod<float>              : TrueType {};
 template<> struct IsPod<double>             : TrueType {};
 template<> struct IsPod<wchar_t>            : TrueType {};
 template<typename T> struct IsPod<T*>       : TrueType {};
 
-/* 20.9.5 Type property queries */
+/* 20.9.5 Type property queries [meta.unary.prop.query] */
 
-/* 20.9.6 Relationships between types */
+/* 20.9.6 Relationships between types [meta.rel] */
 
 /**
  * IsSame tests whether two types are the same type.
  *
  * mozilla::IsSame<int, int>::value is true;
  * mozilla::IsSame<int*, int*>::value is true;
  * mozilla::IsSame<int, unsigned int>::value is false;
  * mozilla::IsSame<void, void>::value is true;
@@ -218,29 +218,29 @@ struct ConvertibleTester
  * are related through private inheritance, and you'll get a compile error if
  * you try.  Just don't do it!
  */
 template<typename From, typename To>
 struct IsConvertible
   : IntegralConstant<bool, detail::ConvertibleTester<From, To>::value>
 {};
 
-/* 20.9.7 Transformations between types */
+/* 20.9.7 Transformations between types [meta.trans] */
 
-/* 20.9.7.1 Const-volatile modifications */
+/* 20.9.7.1 Const-volatile modifications [meta.trans.cv] */
 
-/* 20.9.7.2 Reference modifications */
+/* 20.9.7.2 Reference modifications [meta.trans.ref] */
 
-/* 20.9.7.3 Sign modifications */
+/* 20.9.7.3 Sign modifications [meta.trans.sign] */
 
-/* 20.9.7.4 Array modifications */
+/* 20.9.7.4 Array modifications [meta.trans.arr] */
 
-/* 20.9.7.5 Pointer modifications */
+/* 20.9.7.5 Pointer modifications [meta.trans.ptr] */
 
-/* 20.9.7.6 Other transformations */
+/* 20.9.7.6 Other transformations [meta.trans.other] */
 
 /**
  * EnableIf is a struct containing a typedef of T if and only if B is true.
  *
  * mozilla::EnableIf<true, int>::Type is int;
  * mozilla::EnableIf<false, int>::Type is a compile-time error.
  *
  * Use this template to implement SFINAE-style (Substitution Failure Is not An