File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Expand file tree Collapse file tree 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")
188188 if (WINDOWS_STORE OR WINDOWS_PHONE)
189189 add_compile_options (/ZW)
190190 endif ()
191+
192+ if (NOT (MSVC_VERSION LESS 1920))
193+ add_compile_options (/permissive-)
194+ endif ()
191195else ()
192196 message ("-- Unknown compiler, success is doubtful." )
193197 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
528528public:
529529 static pplx::task<T> parse (streams::streambuf<CharType> buffer)
530530 {
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 {});
534537 }
535538
536539private:
@@ -539,15 +542,6 @@ class type_parser
539542 _parse_floating_point (buffer);
540543 }
541544
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-
551545 static pplx::task<T> _parse (streams::streambuf<CharType> buffer, std::true_type, std::false_type)
552546 {
553547 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