Opened 3 years ago

Last modified 3 years ago

#12006 new Bugs

Compile error on Windows of boost/functional/hash/extensions.hpp

Reported by: kilian.kilger@… Owned by: Daniel James
Milestone: To Be Determined Component: hash
Version: Boost 1.58.0 Severity: Problem
Keywords: Cc:

Description

I use STLport 4.5.0 and Visual Studio 2013. I get the following compiler error:

base\boost\boost/functional/hash/extensions.hpp(262) : error C2784: 'size_t boost::hash_value(const _STL::complex<_Tp> &)' : could not deduce template argument for 'const _STL::complex<_Tp> &' from 'const wchar_t'
        boost/functional/hash/extensions.hpp(64) : see declaration of 'boost::hash_value'
        boost/functional/hash/extensions.hpp(261) : while compiling class template member function 'size_t boost::hash<T>::operator ()(const T &) const'
        with
        [
            T=wchar_t
        ]
        boost/functional/hash/hash.hpp(313) : see reference to function template instantiation 'size_t boost::hash<T>::operator ()(const T &) const' being compiled
        with
        [
            T=wchar_t
        ]
        boost/functional/hash/hash.hpp(312) : see reference to class template instantiation 'boost::hash<T>' being compiled
        with
        [
            T=wchar_t
        ]
        boost\boost/functional/hash/hash.hpp(327) : see reference to function template instantiation 'void boost::hash_combine<wchar_t>(size_t &,const T &)' being compiled
        with
        [
            T=wchar_t
        ]
        boost/functional/hash/hash.hpp(386) : see reference to function template instantiation 'size_t boost::hash_range<const wchar_t*>(It,It)' being compiled
        with
        [
            It=const wchar_t *
        ]
        boost/functional/hash/hash.hpp(458) : see reference to function template instantiation 'size_t boost::hash_value<wchar_t,_STL::allocator<wchar_t>>(const _STL::basic_string<wchar_t,_STL::char_traits<wchar_t>,_STL::allocator<wchar_t>> &)' being compiled
base\boost\boost/functional/hash/extensions.hpp(262) : error C2784: 'size_t boost::hash_value(const _STL::multimap<_Key,_Tp,_Compare,_Alloc> &)' : could not deduce template argument for 'const _STL::multimap<_Key,_Tp,_Compare,_Alloc> &' from 'const wchar_t'
        boost\boost/functional/hash/extensions.hpp(61) : see declaration of 'boost::hash_value'
base\boost\boost/functional/hash/extensions.hpp(262) : error C2784: 'size_t boost::hash_value(const _STL::map<_Key,_Tp,_Compare,_Alloc> &)' : could not deduce template argument for 'const _STL::map<_Key,_Tp,_Compare,_Alloc> &' from 'const wchar_t'
        boost\boost/functional/hash/extensions.hpp(59) : see declaration of 'boost::hash_value'
base\boost\boost/functional/hash/extensions.hpp(262) : error C2784: 'size_t boost::hash_value(const _STL::multiset<_Key,_Compare,_Alloc> &)' : could not deduce template argument for 'const _STL::multiset<_Key,_Compare,_Alloc> &' from 'const wchar_t'
        boost\boost/functional/hash/extensions.hpp(57) : see declaration of 'boost::hash_value'
base\boost\boost/functional/hash/extensions.hpp(262) : error C2784: 'size_t boost::hash_value(const _STL::set<_Key,_Compare,_Alloc> &)' : could not deduce template argument for 'const _STL::set<_Key,_Compare,_Alloc> &' from 'const wchar_t'
        boost\boost/functional/hash/extensions.hpp(55) : see declaration of 'boost::hash_value'
base\boost\boost/functional/hash/extensions.hpp(262) : error C2784: 'size_t boost::hash_value(const _STL::deque<_Tp,_Alloc> &)' : could not deduce template argument for 'const _STL::deque<_Tp,_Alloc> &' from 'const wchar_t'
        boost\boost/functional/hash/extensions.hpp(53) : see declaration of 'boost::hash_value'
base\boost\boost/functional/hash/extensions.hpp(262) : error C2784: 'size_t boost::hash_value(const _STL::list<_Tp,_Alloc> &)' : could not deduce template argument for 'const _STL::list<_Tp,_Alloc> &' from 'const wchar_t'
        boost\boost/functional/hash/extensions.hpp(51) : see declaration of 'boost::hash_value'
base\boost\boost/functional/hash/extensions.hpp(262) : error C2784: 'size_t boost::hash_value(const _STL::vector<_Tp,_Alloc> &)' : could not deduce template argument for 'const _STL::vector<_Tp,_Alloc> &' from 'const wchar_t'
        boost\boost/functional/hash/extensions.hpp(49) : see declaration of 'boost::hash_value'
base\boost\boost/functional/hash/extensions.hpp(262) : error C2784: 'size_t boost::hash_value(const _STL::pair<_T1,_T2> &)' : could not deduce template argument for 'const _STL::pair<_T1,_T2> &' from 'const wchar_t'
        boost\boost/functional/hash/extensions.hpp(47) : see declaration of 'boost::hash_value'
base\boost\boost/functional/hash/extensions.hpp(262) : error C2893: Failed to specialize function template 'boost::hash_detail::float_numbers<T>::type boost::hash_value(T)'
        With the following template arguments:
        'T=wchar_t'
base\boost\boost/functional/hash/extensions.hpp(262) : error C2784: 'size_t boost::hash_value(const _STL::basic_string<Ch,_STL::char_traits<_CharT>,A> &)' : could not deduce template argument for 'const _STL::basic_string<Ch,_STL::char_traits<_CharT>,A> &' from 'const wchar_t'
        boost\boost/functional/hash/hash.hpp(154) : see declaration of 'boost::hash_value'
base\boost\boost/functional/hash/extensions.hpp(262) : error C2784: 'size_t boost::hash_value(T (&)[N])' : could not deduce template argument for 'T (&)[N]' from 'const wchar_t'
        boost/functional/hash/hash.hpp(150) : see declaration of 'boost::hash_value'
base\boost\boost/functional/hash/extensions.hpp(262) : error C2784: 'size_t boost::hash_value(const T (&)[N])' : could not deduce template argument for 'const T (&)[N]' from 'const wchar_t'
        boost/functional/hash/hash.hpp(147) : see declaration of 'boost::hash_value'
base\boost\boost/functional/hash/extensions.hpp(262) : error C2784: 'size_t boost::hash_value(T *const &)' : could not deduce template argument for 'T *const &' from 'const wchar_t'
        boost/functional/hash/hash.hpp(140) : see declaration of 'boost::hash_value'
base\boost\boost/functional/hash/extensions.hpp(262) : error C2893: Failed to specialize function template 'boost::enable_if<boost::is_enum<T>,size_t>::type boost::hash_value(T)'
        With the following template arguments:
        'T=wchar_t'
base\boost\boost/functional/hash/extensions.hpp(262) : error C2893: Failed to specialize function template 'boost::hash_detail::ulong_numbers<T>::type boost::hash_value(T)'
        With the following template arguments:
        'T=wchar_t'
base\boost\boost/functional/hash/extensions.hpp(262) : error C2893: Failed to specialize function template 'boost::hash_detail::long_numbers<T>::type boost::hash_value(T)'
        With the following template arguments:
        'T=wchar_t'
base\boost\boost/functional/hash/extensions.hpp(262) : error C2893: Failed to specialize function template 'boost::hash_detail::basic_numbers<T>::type boost::hash_value(T)'
        With the following template arguments:
        'T=wchar_t'

If I set BOOST_NO_FUNCTION_TEMPLATE_ORDERING, I get a similar error.

I don't know where they come from. With old boost versions, it worked just fine. Do you have any clue?

Best regards, Kilian.

Change History (1)

comment:1 Changed 3 years ago by John Maddock

Component: Nonehash
Owner: set to Daniel James
Note: See TracTickets for help on using tickets.