Bug 1190313 - Set MOZ_HAVE_EXPLICIT_CONVERSION on VS2015. r=nfroyd
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Wed, 05 Aug 2015 17:14:42 +0900
changeset 287942 f1ac9a24ab82abd6ec440b29d01ac901f01a1ad3
parent 287941 08cdf088f429a49314e3e2ad871e477688323979
child 287943 3ae3c45db961997a182616416097a8c49c6e9742
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnfroyd
bugs1190313
milestone42.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 1190313 - Set MOZ_HAVE_EXPLICIT_CONVERSION on VS2015. r=nfroyd
mfbt/Attributes.h
--- a/mfbt/Attributes.h
+++ b/mfbt/Attributes.h
@@ -47,16 +47,19 @@
  * for forward compatibility.
  *
  * Even though some versions of MSVC support explicit conversion operators, we
  * don't indicate support for them here, due to
  * http://stackoverflow.com/questions/20498142/visual-studio-2013-explicit-keyword-bug
  */
 #  define MOZ_HAVE_NEVER_INLINE          __declspec(noinline)
 #  define MOZ_HAVE_NORETURN              __declspec(noreturn)
+#  if _MSC_VER >= 1900
+#    define MOZ_HAVE_EXPLICIT_CONVERSION
+#  endif
 #  ifdef __clang__
      /* clang-cl probably supports constexpr and explicit conversions. */
 #    if __has_extension(cxx_constexpr)
 #      define MOZ_HAVE_CXX11_CONSTEXPR
 #    endif
 #    if __has_extension(cxx_explicit_conversions)
 #      define MOZ_HAVE_EXPLICIT_CONVERSION
 #    endif