Opened 4 years ago
#13629 new Bugs
boost::fusion::make_map cannot be called with boost::fusion::vector
Reported by: | Owned by: | Joel de Guzman | |
---|---|---|---|
Milestone: | To Be Determined | Component: | fusion |
Version: | Boost 1.67.0 | Severity: | Problem |
Keywords: | Cc: |
Description
The following code cannot be compiled on MSVC2017.
struct Z; boost::fusion::make_map<Z>(boost::fusion::make_vector(1, 2));
Error is like this
1>d:\libraries\boost_1_67_0\boost\fusion\container\map\detail\map_impl.hpp(112): error C2664: 'boost::fusion::pair<test_main::test_method::Z,T>::pair(const boost::fusion::pair<test_main::test_method::Z,T> &)': cannot convert argument 1 from 'const int' to 'const boost::fusion::vector<int,int> &' 1> with 1> [ 1> T=boost::fusion::vector<int,int> 1> ] 1>d:\libraries\boost_1_67_0\boost\fusion\container\map\detail\map_impl.hpp(113): note: Reason: cannot convert from 'const int' to 'const boost::fusion::vector<int,int>' 1>d:\libraries\boost_1_67_0\boost\fusion\container\map\detail\map_impl.hpp(113): note: No constructor could take the source type, or constructor overload resolution was ambiguous 1>d:\libraries\boost_1_67_0\boost\fusion\container\map\map.hpp(74): note: see reference to function template instantiation 'boost::fusion::detail::map_impl<0,boost::fusion::pair<test_main::test_method::Z,T>>::map_impl<boost::fusion::vector_iterator<Sequence,0>>(const Iterator &,boost::fusion::detail::map_impl_from_iterator)' being compiled 1> with 1> [ 1> T=boost::fusion::vector<int,int>, 1> Sequence=boost::fusion::vector<int,int>, 1> Iterator=boost::fusion::vector_iterator<const boost::fusion::vector<int,int>,0> 1> ] 1>d:\libraries\boost_1_67_0\boost\fusion\container\map\map.hpp(73): note: see reference to function template instantiation 'boost::fusion::detail::map_impl<0,boost::fusion::pair<test_main::test_method::Z,T>>::map_impl<boost::fusion::vector_iterator<Sequence,0>>(const Iterator &,boost::fusion::detail::map_impl_from_iterator)' being compiled 1> with 1> [ 1> T=boost::fusion::vector<int,int>, 1> Sequence=boost::fusion::vector<int,int>, 1> Iterator=boost::fusion::vector_iterator<const boost::fusion::vector<int,int>,0> 1> ] 1>d:\libraries\boost_1_67_0\boost\fusion\container\generation\make_map.hpp(59): note: see reference to function template instantiation 'boost::fusion::map<boost::fusion::pair<test_main::test_method::Z,T>>::map<boost::fusion::vector<int,int>,void>(const Sequence &)' being compiled 1> with 1> [ 1> T=boost::fusion::vector<int,int>, 1> Sequence=boost::fusion::vector<int,int> 1> ] 1>d:\libraries\boost_1_67_0\boost\fusion\container\generation\make_map.hpp(59): note: see reference to function template instantiation 'boost::fusion::map<boost::fusion::pair<test_main::test_method::Z,T>>::map<boost::fusion::vector<int,int>,void>(const Sequence &)' being compiled 1> with 1> [ 1> T=boost::fusion::vector<int,int>, 1> Sequence=boost::fusion::vector<int,int> 1> ] 1>d:\path\to\my_code.cpp(LINE): note: see reference to function template instantiation 'boost::fusion::map<boost::fusion::pair<test_main::test_method::Z,T>> boost::fusion::make_map<test_main::test_method::Z,boost::fusion::vector<int,int>>(const boost::fusion::vector<int,int> &)' being compiled 1> with 1> [ 1> T=boost::fusion::vector<int,int> 1> ]
Note:
See TracTickets
for help on using tickets.