Bug 1319016 - Part1 - Make IntegralConstant::value use constexpr. r=froydnj
authorJames Cheng <jacheng@mozilla.com>
Mon, 21 Nov 2016 14:27:58 +0800
changeset 368621 74be7a5aa2ed3cec0d40db3e58ab730a46d704bb
parent 368620 6a3911c19f7fd0ea8b679b7164740b19ee1dabbf
child 368622 db2ce61de2cede8c3573c24cae5ebdf6f9ce572e
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1319016
milestone53.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
Bug 1319016 - Part1 - Make IntegralConstant::value use constexpr. r=froydnj MozReview-Commit-ID: DtrDeMC1f5T
mfbt/TypeTraits.h
--- a/mfbt/TypeTraits.h
+++ b/mfbt/TypeTraits.h
@@ -41,17 +41,17 @@ typename AddRvalueReference<T>::Type Dec
 
 /**
  * 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
 {
-  static const T value = Value;
+  static constexpr T value = Value;
   typedef T ValueType;
   typedef IntegralConstant<T, Value> Type;
 };
 
 /** Convenient aliases. */
 typedef IntegralConstant<bool, true> TrueType;
 typedef IntegralConstant<bool, false> FalseType;