commit 9a4db31fa87217748fdeb412ffd63fa2edbccff7 Author: Gratian Lup Date: Thu Dec 8 04:48:09 2016 -0800 Fixes for VS2017 compatibility diff --git a/src/mongo/util/represent_as.h b/src/mongo/util/represent_as.h index f85805a..d0512f4 100644 --- a/src/mongo/util/represent_as.h +++ b/src/mongo/util/represent_as.h @@ -181,7 +181,7 @@ int compare(T t, U u) { template boost::optional representAs(Input number) { if (std::is_same::value) { - return {static_cast(number)}; + return boost::optional(static_cast(number)); } // If number is NaN and Output can also represent NaN, return NaN @@ -194,7 +194,7 @@ boost::optional representAs(Input number) { using std::isnan; if (std::is_floating_point::value && isnan(number)) { if (std::is_floating_point::value) { - return {static_cast(number)}; + return boost::optional(static_cast(number)); } } } @@ -235,7 +235,7 @@ boost::optional representAs(Input number) { } } - return {static_cast(numberOut)}; + return boost::optional(static_cast(numberOut)); } } // namespace mongo diff --git a/src/third_party/mozjs-45/include/js/TraceKind.h b/src/third_party/mozjs-45/include/js/TraceKind.h index c7e1a40dac..155494a3e9 100644 --- a/src/third_party/mozjs-45/include/js/TraceKind.h +++ b/src/third_party/mozjs-45/include/js/TraceKind.h @@ -100,7 +100,7 @@ JS_FOR_EACH_TRACEKIND(JS_EXPAND_DEF); // the other hand, gets very confused if we have a |template| token there. // The clang-cl front end defines _MSC_VER, but still requires the explicit // template declaration, so we must test for __clang__ here as well. -#if defined(_MSC_VER) && !defined(__clang__) +#if (defined(_MSC_VER) && _MSC_VER < 1910) && !defined(__clang__) # define JS_DEPENDENT_TEMPLATE_HINT #else # define JS_DEPENDENT_TEMPLATE_HINT template