Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#5934 closed Bugs (fixed)

boost/math/tools/tuple.hpp omits "tr1/" from #include directive.

Reported by: David Oliver <doliver@…> Owned by: johnmaddock
Milestone: To Be Determined Component: math
Version: Boost 1.47.0 Severity: Problem
Keywords: Cc:


In version_1_47_0 and the current head (Revision 74542), boost/math/tools/tuple.hpp includes at line 34 the C++11 header <tuple>, rather than the TR1 header <tr1/tuple>:

#elif defined(BOOST_HAS_TR1_TUPLE)

#include <tuple>

namespace boost{ namespace math{

using ::std::tr1::tuple;

// [] Tuple creation functions
using ::std::tr1::ignore;
using ::std::tr1::make_tuple;
using ::std::tr1::tie;
using ::std::tr1::get;

// [] Tuple helper classes
using ::std::tr1::tuple_size;
using ::std::tr1::tuple_element;


#elif  ...

With gcc 4.4.3, without std=c++0x or std=gnu++0x specified, this produces a compatibility warning; other compilers/versions are likely to fail to find the header.

Changing the line to:

#include <tr1/tuple>

makes the compilation (and my unit tests) successful.


David Oliver.

Attachments (0)

Change History (4)

comment:1 Changed 6 years ago by johnmaddock

Actually <tuple> is the TR1-conforming include and <tr1/tuple> is a gcc-ism, will fix anyway.

comment:2 Changed 6 years ago by johnmaddock

  • Resolution set to fixed
  • Status changed from new to closed

(In [74891]) GCC workaround when using TR1 tuple. Fixes #5934.

comment:3 Changed 6 years ago by David Oliver <doliver@…>

Thanks for fixing. I should have realized that <tr1/tuple> was a gcc-ism, but the compatibility warning makes it sound authoritative.



comment:4 Changed 6 years ago by johnmaddock

(In [74984]) Merge recent bug fixes from Trunk. Refs #6014 Refs #5832 Refs #5934 Refs #6001 Refs #5982 Refs #5914 Refs #5927

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain johnmaddock.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.