Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#5233 closed Patches (fixed)

array test clashes with C++0x

Reported by: Chris Jefferson Owned by: Marshall Clow
Milestone: To Be Determined Component: array
Version: Boost 1.45.0 Severity: Problem
Keywords: Cc:

Description

Now c++0x has an <array> header, boost::array and std::array can clash.

This happens in one array test. I attach a tiny patch that fixes it. We could also remove 'using namespace std', but that requires changing more lines.

Attachments (1)

array_test.patch (492 bytes ) - added by Chris Jefferson 12 years ago.
Patch to libs/array/test/array2.cpp

Download all attachments as: .zip

Change History (6)

by Chris Jefferson, 12 years ago

Attachment: array_test.patch added

Patch to libs/array/test/array2.cpp

comment:1 by Marshall Clow, 12 years ago

Status: newassigned

I don't mind patching this - but I don't understand why you're getting the errors.

The std::array stuff for C++0x is all in the header <array>, which is not included by array2.

Can you tell me how it is getting included on your system? (and what your system is)

comment:2 by Chris Jefferson, 12 years ago

I'm using clang with libc++, in C++0x mode. A very unusual and new combination!

The include system seems to go like:

<utility> includes pair, which needs tuple-like access to pair (tuple_size, tuple_element). This pulls in a header that defines the tuple-like access for pair, tuple and array all in one go.

comment:3 by Marshall Clow, 12 years ago

(In [69291]) qualify array to avoid conflict with std::array; Refs #5233

comment:4 by anonymous, 12 years ago

Resolution: fixed
Status: assignedclosed

comment:5 by Marshall Clow, 12 years ago

Why was this closed? And by whom?

I was keeping this open because the fix had not been merged to the release branch.

Note: See TracTickets for help on using tickets.