|
|
От: |
niXman
|
https://github.com/niXman |
| Дата: | 16.04.14 09:22 | ||
| Оценка: | |||
std::map<int, std::string> map;
map.insert(std::make_pair(1, "1"));(так как тут спойлер создавать? я же видел на этом форуме спойлеры.)../include/boost_cont_map.hpp:61:35: error: call of overloaded 'insert(std::pair<int, const char*>)' is ambiguous
map.insert(std::make_pair(1, "1"));
^
../include/boost_cont_map.hpp:61:35: note: candidates are:
In file included from ../../../include/yas/serializers/binary/boost/boost_container_map_serializers.hpp:40:0,
from ../../../include/yas/serializers/boost_types_serializers.hpp:96,
from ../main.cpp:52:
/usr/local/include/boost/container/map.hpp:470:29: note: std::pair<typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator, bool> boost::container::map<Key, T, Compare, Allocator>::insert(const value_type&) [with Key = int; T = std::basic_string<char>; Compare = std::less<int>; Allocator = std::allocator<std::pair<const int, std::basic_string<char> > >; typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator = boost::container::container_detail::iterator<boost::intrusive::tree_iterator<boost::intrusive::bhtraits<boost::container::container_detail::rbtree_node<std::pair<const int, std::basic_string<char> >, void*>, boost::intrusive::rbtree_node_traits<void*, true>, (boost::intrusive::link_mode_type)0u, boost::intrusive::default_tag, 3u>, false>, false>; boost::container::map<Key, T, Compare, Allocator>::value_type = std::pair<const int, std::basic_string<char> >]
std::pair<iterator,bool> insert(const value_type& x)
^
/usr/local/include/boost/container/map.hpp:481:29: note: std::pair<typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator, bool> boost::container::map<Key, T, Compare, Allocator>::insert(const nonconst_value_type&) [with Key = int; T = std::basic_string<char>; Compare = std::less<int>; Allocator = std::allocator<std::pair<const int, std::basic_string<char> > >; typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator = boost::container::container_detail::iterator<boost::intrusive::tree_iterator<boost::intrusive::bhtraits<boost::container::container_detail::rbtree_node<std::pair<const int, std::basic_string<char> >, void*>, boost::intrusive::rbtree_node_traits<void*, true>, (boost::intrusive::link_mode_type)0u, boost::intrusive::default_tag, 3u>, false>, false>; boost::container::map<Key, T, Compare, Allocator>::nonconst_value_type = std::pair<int, std::basic_string<char> >]
std::pair<iterator,bool> insert(const nonconst_value_type& x)
^
/usr/local/include/boost/container/map.hpp:492:29: note: std::pair<typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator, bool> boost::container::map<Key, T, Compare, Allocator>::insert(boost::container::map<Key, T, Compare, Allocator>::nonconst_value_type&&) [with Key = int; T = std::basic_string<char>; Compare = std::less<int>; Allocator = std::allocator<std::pair<const int, std::basic_string<char> > >; typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator = boost::container::container_detail::iterator<boost::intrusive::tree_iterator<boost::intrusive::bhtraits<boost::container::container_detail::rbtree_node<std::pair<const int, std::basic_string<char> >, void*>, boost::intrusive::rbtree_node_traits<void*, true>, (boost::intrusive::link_mode_type)0u, boost::intrusive::default_tag, 3u>, false>, false>; boost::container::map<Key, T, Compare, Allocator>::nonconst_value_type = std::pair<int, std::basic_string<char> >]
std::pair<iterator,bool> insert(BOOST_RV_REF(nonconst_value_type) x)
^
/usr/local/include/boost/container/map.hpp:503:29: note: std::pair<typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator, bool> boost::container::map<Key, T, Compare, Allocator>::insert(boost::container::map<Key, T, Compare, Allocator>::movable_value_type&&) [with Key = int; T = std::basic_string<char>; Compare = std::less<int>; Allocator = std::allocator<std::pair<const int, std::basic_string<char> > >; typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator = boost::container::container_detail::iterator<boost::intrusive::tree_iterator<boost::intrusive::bhtraits<boost::container::container_detail::rbtree_node<std::pair<const int, std::basic_string<char> >, void*>, boost::intrusive::rbtree_node_traits<void*, true>, (boost::intrusive::link_mode_type)0u, boost::intrusive::default_tag, 3u>, false>, false>; boost::container::map<Key, T, Compare, Allocator>::movable_value_type = boost::container::container_detail::pair<int, std::basic_string<char> >]
std::pair<iterator,bool> insert(BOOST_RV_REF(movable_value_type) x)
^
/usr/local/include/boost/container/map.hpp:514:29: note: std::pair<typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator, bool> boost::container::map<Key, T, Compare, Allocator>::insert(boost::container::map<Key, T, Compare, Allocator>::value_type&&) [with Key = int; T = std::basic_string<char>; Compare = std::less<int>; Allocator = std::allocator<std::pair<const int, std::basic_string<char> > >; typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator = boost::container::container_detail::iterator<boost::intrusive::tree_iterator<boost::intrusive::bhtraits<boost::container::container_detail::rbtree_node<std::pair<const int, std::basic_string<char> >, void*>, boost::intrusive::rbtree_node_traits<void*, true>, (boost::intrusive::link_mode_type)0u, boost::intrusive::default_tag, 3u>, false>, false>; boost::container::map<Key, T, Compare, Allocator>::value_type = std::pair<const int, std::basic_string<char> >]
std::pair<iterator,bool> insert(BOOST_RV_REF(value_type) x)
^
In file included from ../main.cpp:85:0:
../include/boost_cont_map.hpp:62:35: error: call of overloaded 'insert(std::pair<int, const char*>)' is ambiguous
map.insert(std::make_pair(2, "2"));
^
../include/boost_cont_map.hpp:62:35: note: candidates are:
In file included from ../../../include/yas/serializers/binary/boost/boost_container_map_serializers.hpp:40:0,
from ../../../include/yas/serializers/boost_types_serializers.hpp:96,
from ../main.cpp:52:
/usr/local/include/boost/container/map.hpp:470:29: note: std::pair<typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator, bool> boost::container::map<Key, T, Compare, Allocator>::insert(const value_type&) [with Key = int; T = std::basic_string<char>; Compare = std::less<int>; Allocator = std::allocator<std::pair<const int, std::basic_string<char> > >; typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator = boost::container::container_detail::iterator<boost::intrusive::tree_iterator<boost::intrusive::bhtraits<boost::container::container_detail::rbtree_node<std::pair<const int, std::basic_string<char> >, void*>, boost::intrusive::rbtree_node_traits<void*, true>, (boost::intrusive::link_mode_type)0u, boost::intrusive::default_tag, 3u>, false>, false>; boost::container::map<Key, T, Compare, Allocator>::value_type = std::pair<const int, std::basic_string<char> >]
std::pair<iterator,bool> insert(const value_type& x)
^
/usr/local/include/boost/container/map.hpp:481:29: note: std::pair<typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator, bool> boost::container::map<Key, T, Compare, Allocator>::insert(const nonconst_value_type&) [with Key = int; T = std::basic_string<char>; Compare = std::less<int>; Allocator = std::allocator<std::pair<const int, std::basic_string<char> > >; typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator = boost::container::container_detail::iterator<boost::intrusive::tree_iterator<boost::intrusive::bhtraits<boost::container::container_detail::rbtree_node<std::pair<const int, std::basic_string<char> >, void*>, boost::intrusive::rbtree_node_traits<void*, true>, (boost::intrusive::link_mode_type)0u, boost::intrusive::default_tag, 3u>, false>, false>; boost::container::map<Key, T, Compare, Allocator>::nonconst_value_type = std::pair<int, std::basic_string<char> >]
std::pair<iterator,bool> insert(const nonconst_value_type& x)
^
/usr/local/include/boost/container/map.hpp:492:29: note: std::pair<typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator, bool> boost::container::map<Key, T, Compare, Allocator>::insert(boost::container::map<Key, T, Compare, Allocator>::nonconst_value_type&&) [with Key = int; T = std::basic_string<char>; Compare = std::less<int>; Allocator = std::allocator<std::pair<const int, std::basic_string<char> > >; typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator = boost::container::container_detail::iterator<boost::intrusive::tree_iterator<boost::intrusive::bhtraits<boost::container::container_detail::rbtree_node<std::pair<const int, std::basic_string<char> >, void*>, boost::intrusive::rbtree_node_traits<void*, true>, (boost::intrusive::link_mode_type)0u, boost::intrusive::default_tag, 3u>, false>, false>; boost::container::map<Key, T, Compare, Allocator>::nonconst_value_type = std::pair<int, std::basic_string<char> >]
std::pair<iterator,bool> insert(BOOST_RV_REF(nonconst_value_type) x)
^
/usr/local/include/boost/container/map.hpp:503:29: note: std::pair<typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator, bool> boost::container::map<Key, T, Compare, Allocator>::insert(boost::container::map<Key, T, Compare, Allocator>::movable_value_type&&) [with Key = int; T = std::basic_string<char>; Compare = std::less<int>; Allocator = std::allocator<std::pair<const int, std::basic_string<char> > >; typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator = boost::container::container_detail::iterator<boost::intrusive::tree_iterator<boost::intrusive::bhtraits<boost::container::container_detail::rbtree_node<std::pair<const int, std::basic_string<char> >, void*>, boost::intrusive::rbtree_node_traits<void*, true>, (boost::intrusive::link_mode_type)0u, boost::intrusive::default_tag, 3u>, false>, false>; boost::container::map<Key, T, Compare, Allocator>::movable_value_type = boost::container::container_detail::pair<int, std::basic_string<char> >]
std::pair<iterator,bool> insert(BOOST_RV_REF(movable_value_type) x)
^
/usr/local/include/boost/container/map.hpp:514:29: note: std::pair<typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator, bool> boost::container::map<Key, T, Compare, Allocator>::insert(boost::container::map<Key, T, Compare, Allocator>::value_type&&) [with Key = int; T = std::basic_string<char>; Compare = std::less<int>; Allocator = std::allocator<std::pair<const int, std::basic_string<char> > >; typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator = boost::container::container_detail::iterator<boost::intrusive::tree_iterator<boost::intrusive::bhtraits<boost::container::container_detail::rbtree_node<std::pair<const int, std::basic_string<char> >, void*>, boost::intrusive::rbtree_node_traits<void*, true>, (boost::intrusive::link_mode_type)0u, boost::intrusive::default_tag, 3u>, false>, false>; boost::container::map<Key, T, Compare, Allocator>::value_type = std::pair<const int, std::basic_string<char> >]
std::pair<iterator,bool> insert(BOOST_RV_REF(value_type) x)
^
In file included from ../main.cpp:85:0:
../include/boost_cont_map.hpp:63:35: error: call of overloaded 'insert(std::pair<int, const char*>)' is ambiguous
map.insert(std::make_pair(3, "3"));
^
../include/boost_cont_map.hpp:63:35: note: candidates are:
In file included from ../../../include/yas/serializers/binary/boost/boost_container_map_serializers.hpp:40:0,
from ../../../include/yas/serializers/boost_types_serializers.hpp:96,
from ../main.cpp:52:
/usr/local/include/boost/container/map.hpp:470:29: note: std::pair<typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator, bool> boost::container::map<Key, T, Compare, Allocator>::insert(const value_type&) [with Key = int; T = std::basic_string<char>; Compare = std::less<int>; Allocator = std::allocator<std::pair<const int, std::basic_string<char> > >; typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator = boost::container::container_detail::iterator<boost::intrusive::tree_iterator<boost::intrusive::bhtraits<boost::container::container_detail::rbtree_node<std::pair<const int, std::basic_string<char> >, void*>, boost::intrusive::rbtree_node_traits<void*, true>, (boost::intrusive::link_mode_type)0u, boost::intrusive::default_tag, 3u>, false>, false>; boost::container::map<Key, T, Compare, Allocator>::value_type = std::pair<const int, std::basic_string<char> >]
std::pair<iterator,bool> insert(const value_type& x)
^
/usr/local/include/boost/container/map.hpp:481:29: note: std::pair<typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator, bool> boost::container::map<Key, T, Compare, Allocator>::insert(const nonconst_value_type&) [with Key = int; T = std::basic_string<char>; Compare = std::less<int>; Allocator = std::allocator<std::pair<const int, std::basic_string<char> > >; typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator = boost::container::container_detail::iterator<boost::intrusive::tree_iterator<boost::intrusive::bhtraits<boost::container::container_detail::rbtree_node<std::pair<const int, std::basic_string<char> >, void*>, boost::intrusive::rbtree_node_traits<void*, true>, (boost::intrusive::link_mode_type)0u, boost::intrusive::default_tag, 3u>, false>, false>; boost::container::map<Key, T, Compare, Allocator>::nonconst_value_type = std::pair<int, std::basic_string<char> >]
std::pair<iterator,bool> insert(const nonconst_value_type& x)
^
/usr/local/include/boost/container/map.hpp:492:29: note: std::pair<typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator, bool> boost::container::map<Key, T, Compare, Allocator>::insert(boost::container::map<Key, T, Compare, Allocator>::nonconst_value_type&&) [with Key = int; T = std::basic_string<char>; Compare = std::less<int>; Allocator = std::allocator<std::pair<const int, std::basic_string<char> > >; typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator = boost::container::container_detail::iterator<boost::intrusive::tree_iterator<boost::intrusive::bhtraits<boost::container::container_detail::rbtree_node<std::pair<const int, std::basic_string<char> >, void*>, boost::intrusive::rbtree_node_traits<void*, true>, (boost::intrusive::link_mode_type)0u, boost::intrusive::default_tag, 3u>, false>, false>; boost::container::map<Key, T, Compare, Allocator>::nonconst_value_type = std::pair<int, std::basic_string<char> >]
std::pair<iterator,bool> insert(BOOST_RV_REF(nonconst_value_type) x)
^
/usr/local/include/boost/container/map.hpp:503:29: note: std::pair<typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator, bool> boost::container::map<Key, T, Compare, Allocator>::insert(boost::container::map<Key, T, Compare, Allocator>::movable_value_type&&) [with Key = int; T = std::basic_string<char>; Compare = std::less<int>; Allocator = std::allocator<std::pair<const int, std::basic_string<char> > >; typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator = boost::container::container_detail::iterator<boost::intrusive::tree_iterator<boost::intrusive::bhtraits<boost::container::container_detail::rbtree_node<std::pair<const int, std::basic_string<char> >, void*>, boost::intrusive::rbtree_node_traits<void*, true>, (boost::intrusive::link_mode_type)0u, boost::intrusive::default_tag, 3u>, false>, false>; boost::container::map<Key, T, Compare, Allocator>::movable_value_type = boost::container::container_detail::pair<int, std::basic_string<char> >]
std::pair<iterator,bool> insert(BOOST_RV_REF(movable_value_type) x)
^
/usr/local/include/boost/container/map.hpp:514:29: note: std::pair<typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator, bool> boost::container::map<Key, T, Compare, Allocator>::insert(boost::container::map<Key, T, Compare, Allocator>::value_type&&) [with Key = int; T = std::basic_string<char>; Compare = std::less<int>; Allocator = std::allocator<std::pair<const int, std::basic_string<char> > >; typename boost::container::container_detail::rbtree<Key, std::pair<const Key, T>, boost::container::container_detail::select1st<std::pair<const Key, T> >, Compare, Allocator>::iterator = boost::container::container_detail::iterator<boost::intrusive::tree_iterator<boost::intrusive::bhtraits<boost::container::container_detail::rbtree_node<std::pair<const int, std::basic_string<char> >, void*>, boost::intrusive::rbtree_node_traits<void*, true>, (boost::intrusive::link_mode_type)0u, boost::intrusive::default_tag, 3u>, false>, false>; boost::container::map<Key, T, Compare, Allocator>::value_type = std::pair<const int, std::basic_string<char> >]
std::pair<iterator,bool> insert(BOOST_RV_REF(value_type) x)
map.insert(std::make_pair<int, std::string>(1, "1"));