File tree 2 files changed +10
-12
lines changed
2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -188,6 +188,10 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
188
188
if (WINDOWS_STORE OR WINDOWS_PHONE)
189
189
add_compile_options (/ZW)
190
190
endif ()
191
+
192
+ if (NOT (MSVC_VERSION LESS 1920))
193
+ add_compile_options (/permissive-)
194
+ endif ()
191
195
else ()
192
196
message ("-- Unknown compiler, success is doubtful." )
193
197
message ("CMAKE_CXX_COMPILER_ID=${CMAKE_CXX_COMPILER_ID} " )
Original file line number Diff line number Diff line change @@ -528,9 +528,12 @@ class type_parser
528
528
public:
529
529
static pplx::task<T> parse (streams::streambuf<CharType> buffer)
530
530
{
531
- typename _type_parser_integral_traits<T>::_is_integral ii;
532
- typename _type_parser_integral_traits<T>::_is_unsigned ui;
533
- return _parse (buffer, ii, ui);
531
+ typedef typename _type_parser_integral_traits<T>::_is_integral ii;
532
+ typedef typename _type_parser_integral_traits<T>::_is_unsigned ui;
533
+
534
+ static_assert (ii::value || !ui::value, " type is not supported for extraction from a stream" );
535
+
536
+ return _parse (buffer, ii {}, ui {});
534
537
}
535
538
536
539
private:
@@ -539,15 +542,6 @@ class type_parser
539
542
_parse_floating_point (buffer);
540
543
}
541
544
542
- static pplx::task<T> _parse (streams::streambuf<CharType>, std::false_type, std::true_type)
543
- {
544
- #ifdef _WIN32
545
- static_assert (false , " type is not supported for extraction from a stream" );
546
- #else
547
- throw std::runtime_error (" type is not supported for extraction from a stream" );
548
- #endif
549
- }
550
-
551
545
static pplx::task<T> _parse (streams::streambuf<CharType> buffer, std::true_type, std::false_type)
552
546
{
553
547
return type_parser<CharType, int64_t >::parse (buffer).then ([](pplx::task<int64_t > op) -> T {
You can’t perform that action at this time.
0 commit comments