-
Notifications
You must be signed in to change notification settings - Fork 90
Closed
Description
The variant class worked flawlessly together with MSVC so far but, unfortunately, with the latest update of Visual Studio 2017 to version 15.5.x it fails to compile. I'm not sure whether this is a compiler bug or something that requires updating the variant code.
When trying to compile variant/test/get.cpp
, I get the following errors:
..\include\mpark/variant.hpp(575): error C3528: 'Is': the number of elements in this pack expansion does not match the number of elements in 'Js'
..\include\mpark/variant.hpp(582): note: see reference to function template instantiation 'auto mpark::detail::visitation::base::make_fmatrix_impl<F,mpark::detail::base<mpark::detail::Trait::Available,int,std::string>&,,0,1,>(mpark::lib::cpp14::integer_sequence<::size_t>,mpark::lib::cpp14::integer_sequence<::size_t,0,1>)' being compiled
with
[
F=mpark::detail::dtor &&
]
..\include\mpark/variant.hpp(878): note: see reference to class template instantiation 'mpark::detail::base<mpark::detail::Trait::Available,int,std::string>' being compiled
..\include\mpark/variant.hpp(888): note: see reference to class template instantiation 'mpark::detail::destructor<Traits,mpark::detail::Trait::Available>' being compiled
with
[
Traits=mpark::detail::traits<int,std::string>
]
..\include\mpark/variant.hpp(965): note: see reference to class template instantiation 'mpark::detail::constructor<mpark::detail::traits<int,std::string>>' being compiled
..\include\mpark/variant.hpp(1002): note: see reference to class template instantiation 'mpark::detail::move_constructor<mpark::detail::traits<int,std::string>,mpark::detail::Trait::Available>' being compiled
..\include\mpark/variant.hpp(1011): note: see reference to class template instantiation 'mpark::detail::copy_constructor<Traits,mpark::detail::Trait::Available>' being compiled
with
[
Traits=mpark::detail::traits<int,std::string>
]
..\include\mpark/variant.hpp(1125): note: see reference to class template instantiation 'mpark::detail::assignment<mpark::detail::traits<int,std::string>>' being compiled
..\include\mpark/variant.hpp(1162): note: see reference to class template instantiation 'mpark::detail::move_assignment<mpark::detail::traits<int,std::string>,mpark::detail::Trait::Available>' being compiled
..\include\mpark/variant.hpp(1171): note: see reference to class template instantiation 'mpark::detail::copy_assignment<mpark::detail::traits<int,std::string>,mpark::detail::Trait::Available>' being compiled
..\include\mpark/variant.hpp(1470): note: see reference to class template instantiation 'mpark::detail::impl<int,std::string>' being compiled
get.cpp(17): note: see reference to class template instantiation 'mpark::variant<int,std::string>' being compiled
..\include\mpark/variant.hpp(633): note: see reference to function template instantiation 'auto mpark::detail::visitation::base::make_fmatrix<Visitor&&,mpark::detail::base<mpark::detail::Trait::Available,int,std::string>&>(void)' being compiled
with
[
Visitor=mpark::detail::dtor
]
..\include\mpark/variant.hpp(878): note: see reference to function template instantiation 'decltype(auto) mpark::detail::visitation::base::visit_alt<mpark::detail::dtor,mpark::detail::destructor<Traits,mpark::detail::Trait::Available>&>(Visitor &&,mpark::detail::destructor<Traits,mpark::detail::Trait::Available> &)' being compiled
with
[
Traits=mpark::detail::traits<int,std::string>,
Visitor=mpark::detail::dtor
]
..\include\mpark/variant.hpp(878): note: while compiling class template member function 'void mpark::detail::destructor<Traits,mpark::detail::Trait::Available>::destroy(void) noexcept'
with
[
Traits=mpark::detail::traits<int,std::string>
]
..\include\mpark/variant.hpp(870): note: see reference to function template instantiation 'void mpark::detail::destructor<Traits,mpark::detail::Trait::Available>::destroy(void) noexcept' being compiled
with
[
Traits=mpark::detail::traits<int,std::string>
]
..\include\mpark/variant.hpp(574): error C2672: 'mpark::detail::visitation::base::make_farray': no matching overloaded function found
..\include\mpark/variant.hpp(575): error C2893: Failed to specialize function template 'mpark::lib::cpp14::array<std::common_type<std::decay<Fs>::type...>::type,sizeof...(Fs)> mpark::detail::visitation::base::make_farray(Fs &&...)'
..\include\mpark/variant.hpp(575): note: With the following template arguments:
..\include\mpark/variant.hpp(575): note: 'Fs={}'
..\include\mpark/variant.hpp(629): error C2672: 'mpark::detail::visitation::base::at': no matching overloaded function found
..\include\mpark/variant.hpp(633): error C2784: 'const remove_all_extents<T>::type &mpark::detail::visitation::base::at(const mpark::lib::cpp14::array<T,N> &,::size_t,Is...)': could not deduce template argument for 'const mpark::lib::cpp14::array<T,N> &' from 'void'
..\include\mpark/variant.hpp(500): note: see declaration of 'mpark::detail::visitation::base::at'
..\include\mpark/variant.hpp(633): error C2780: 'const T &mpark::detail::visitation::base::at(const T &)': expects 1 arguments - 2 provided
..\include\mpark/variant.hpp(495): note: see declaration of 'mpark::detail::visitation::base::at'
Metadata
Metadata
Assignees
Labels
No labels