Re: [Boost-bugs] [Boost C++ Libraries] #6791: Support boost::array

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6791: Support boost::array
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-04-14 16:39:37


#6791: Support boost::array
-------------------------------------------------------+--------------------
  Reporter: Olaf van der Spek <olafvdspek@…> | Owner: marshall
      Type: Feature Requests | Status: new
 Milestone: To Be Determined | Component: array
   Version: Boost 1.49.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------------------------------+--------------------
Changes (by danieljames):

  * owner: danieljames => marshall
  * component: hash => array

Comment:

 It isn't possible to do it generically, because equality isn't always
 defined the same for all containers.

 Support needs to be added to array itself, which is pretty easy, it just
 needs to include `<boost/functional/hash_fwd.hpp>` and then add something
 like the following to the same namespace as array (so that it will be
 picked up by ADL):

 {{{
 template<....>
 std::size_t hash_value(array<....> const& x) {
     return boost::hash_range(x.begin(), x.end());
 }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6791#comment:1>
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:09 UTC