[Boost-bugs] [Boost C++ Libraries] #12645: error: no match for call to ‘(const hash) (const boost::recursive_variant_&)’

Subject: [Boost-bugs] [Boost C++ Libraries] #12645: error: no match for call to ‘(const hash) (const boost::recursive_variant_&)’
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-12-03 11:39:50


#12645: error: no match for call to ‘(const hash) (const
boost::recursive_variant_&)’
------------------------------+------------------------
 Reporter: mike.gresens@… | Owner: ebf
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: variant
  Version: Boost 1.63.0 | Severity: Regression
 Keywords: |
------------------------------+------------------------
 Since boost 1.62 the recursive variant is not able to find the hash
 function.[[BR]]
 Same for boost 1.63 beta.[[BR]]
 Compiler stops with error: no match for call to ‘(const hash) (const
 boost::recursive_variant_&)’

 code:
 {{{
 #include <boost/variant.hpp>
 #include <unordered_set>

 struct hash;

 using int_t = int;

 template <typename T>
 using basic_set_t = std::unordered_set<T, hash>;

 using value_t = boost::make_recursive_variant<
                 int_t,
                 basic_set_t<boost::recursive_variant_>
>::type;

 using set_t = basic_set_t<value_t>;

 struct hash
 {
         // since boost 1.62 ... error: no match for call to ‘(const hash)
 (const boost::recursive_variant_&)’
         size_t operator()(const value_t& value) const
         {
                 return 0;
         }
 };

 int main()
 {
         set_t s;
         int_t i = 3;
         value_t v = i;
         s.emplace(v); // raises error above
         v = s;
         return 0;
 }
 }}}

 gcc 6.2.0 on Linux[[BR]]
 clang 7.0.2 on Mac

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12645>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC