[Boost-bugs] [Boost C++ Libraries] #10315: multi_index composite_key find() doesn't work with std::tuple

Subject: [Boost-bugs] [Boost C++ Libraries] #10315: multi_index composite_key find() doesn't work with std::tuple
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-08-06 06:53:19


#10315: multi_index composite_key find() doesn't work with std::tuple
------------------------------+-------------------------
 Reporter: christephan@… | Owner: joaquin
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: multi_index
  Version: Boost 1.55.0 | Severity: Problem
 Keywords: |
------------------------------+-------------------------
 com_key_index.find (boost::make_tuple(...)) works.
 While com_key_index.find (std::make_tuple(...)) doesn't compile.

 Using gcc4.8.1 with -std=c++11

 Sample code:
 {{{
 #!c++
 #include <tuple>
 #include <boost/tuple/tuple.hpp>
 #include <boost/multi_index_container.hpp>
 #include <boost/multi_index/member.hpp>
 #include <boost/multi_index/ordered_index.hpp>
 #include <boost/multi_index/composite_key.hpp>

 using namespace std;
 using namespace boost::multi_index;
 using namespace boost;

 struct Point
 {
     string x;
     string y;
     unsigned w;
 };

 int main()
 {
     struct PointX {};
     struct PointYW {};
     multi_index_container<Point,indexed_by<
         ordered_unique <tag<PointX>, member<Point, string, &Point::x>>,
         ordered_unique <tag<PointYW>, composite_key<Point,
             member<Point, string, &Point::y>,
             member<Point, unsigned, &Point::w>
>>
>> points;

     points.get<PointX>().emplace (Point{"A", "B", 1});
     points.get<PointYW>().find (std::make_tuple("B", 1));
     return 0;
 }
 }}}

 By replacing std::make_tuple --> boost::make_tuple, it does compile.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10315>
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:16 UTC