Bug 1381080 patch 7 - Mark nsLiteral[C]String constructor as constexpr. r=erahm
authorL. David Baron <dbaron@dbaron.org>
Thu, 20 Jul 2017 15:47:00 -0700
changeset 418722 5a663e876c3c2d76703368581b033f28495c10e1
parent 418721 9b76213c99cfcb05a53d381edd272cbc29e6fadf
child 418723 ca6ed7d3d71178baf3f6430be3bab85b0ce1f09b
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerserahm
bugs1381080
milestone56.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 1381080 patch 7 - Mark nsLiteral[C]String constructor as constexpr. r=erahm MozReview-Commit-ID: 5ASqQAGBqq
xpcom/string/nsTLiteralString.h
--- a/xpcom/string/nsTLiteralString.h
+++ b/xpcom/string/nsTLiteralString.h
@@ -23,17 +23,17 @@ public:
 
 public:
 
   /**
    * constructor
    */
 
   template<size_type N>
-  explicit nsTLiteralString_CharT(const char_type (&aStr)[N])
+  explicit constexpr nsTLiteralString_CharT(const char_type (&aStr)[N])
     : base_string_type(const_cast<char_type*>(aStr), N - 1,
                        DataFlags::TERMINATED | DataFlags::LITERAL,
                        ClassFlags::NULL_TERMINATED)
   {
   }
 
   /**
    * For compatibility with existing code that requires const ns[C]String*.