Skip to content

Missing <boost/core/ref.hpp> include in tuple_basic.hpp #29

@sergiud

Description

@sergiud

make_tuple_traits is partially specialized with respect to boost::reference_wrapper here. However, its declaration is not necessarily visible in the header. When tuples are constructed by boost::combine over ranges of std::reference_wrapper instances this yields errors such as

<prefix>/include/boost/tuple/detail/tuple_basic.hpp:699:26: error: use of undeclared identifier 'reference_wrapper'
  699 | struct make_tuple_traits<reference_wrapper<T> >{
      |                          ^
<prefix>/include/boost/tuple/detail/tuple_basic.hpp:704:32: error: no template named 'reference_wrapper'; did you mean 'std::reference_wrapper'?
  704 | struct make_tuple_traits<const reference_wrapper<T> >{
      |                                ^
/usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/type_traits:2160:11: note: 'std::reference_wrapper' declared here
 2160 |     class reference_wrapper;
      |           ^
2 errors generated.

Compiler:

Ubuntu clang version 20.1.6 (++20250514063313+1e4d39e07757-1~exp1~20250514183443.116)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions