[Boost-bugs] [Boost C++ Libraries] #12344: boost::fusion::extension::struct_member_name doesn't work with a const sequence

Subject: [Boost-bugs] [Boost C++ Libraries] #12344: boost::fusion::extension::struct_member_name doesn't work with a const sequence
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-07-22 12:33:18


#12344: boost::fusion::extension::struct_member_name doesn't work with a const
sequence
----------------------------------------+---------------------
 Reporter: Benoit Blanchon <benoit@…> | Owner: djowel
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: fusion
  Version: Boost 1.61.0 | Severity: Problem
 Keywords: |
----------------------------------------+---------------------
 Here is the code to reproduce the bug:

 {{{#!cpp
 struct Hello { int World; };

 BOOST_FUSION_ADAPT_STRUCT(Hello, World);

 int main() {
     using Seq = const Hello; // <- works when const is removed
     std::cout << boost::fusion::extension::struct_member_name<Seq,
 0>::call();
 }
 }}}

 [http://melpon.org/wandbox/permlink/0LiQIP59uLbWXFR6 Link to wandbox]

 As stated in the comment, the code works fine when `const` is removed.

 I think that `struct_member_name` should call `std::remove_const` or
 `std::remove_cv`.

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