Add a C++11 ThreadPool implementation in LLVM
[oota-llvm.git] / include / llvm / Support / UnicodeCharRanges.h
index 79137bf353633787c31489af22e14df96656e226..134698c3ec6b394c2b41910f251e3e0715741b87 100644 (file)
@@ -50,9 +50,18 @@ public:
   /// the UnicodeCharSet instance, and should not change. Array is validated by
   /// the constructor, so it makes sense to create as few UnicodeCharSet
   /// instances per each array of ranges, as possible.
+#ifdef NDEBUG
+
+  // FIXME: This could use constexpr + static_assert. This way we
+  // may get rid of NDEBUG in this header. Unfortunately there are some
+  // problems to get this working with MSVC 2013. Change this when
+  // the support for MSVC 2013 is dropped.
+  LLVM_CONSTEXPR UnicodeCharSet(CharRanges Ranges) : Ranges(Ranges) {}
+#else
   UnicodeCharSet(CharRanges Ranges) : Ranges(Ranges) {
     assert(rangesAreValid());
   }
+#endif
 
   /// \brief Returns true if the character set contains the Unicode code point
   /// \p C.