Opened 10 years ago

Closed 8 years ago

#7651 closed Feature Requests (fixed)

static index check for adapted boost::array

Reported by: Tobias Loew Owned by: Joel de Guzman
Milestone: To Be Determined Component: fusion
Version: Boost 1.52.0 Severity: Optimization
Keywords: Cc:

Description

To prevent code like

boost::array<int,2> test; boost::fusion::at_c<3>(test) = 0;

from compiling correctly I suggest to add a static assert "(size_t)N::value < (size_t)Sequence::static_size" to boost::fusion::extension::at_impl<boost_array_tag>::apply<Sequence,N>::call in file boost/fusion/adapted/boost_array/detail/at_impl.hpp

Attachments (1)

at_impl.hpp.patch (431 bytes ) - added by Tobias Loew 10 years ago.

Download all attachments as: .zip

Change History (3)

by Tobias Loew, 10 years ago

Attachment: at_impl.hpp.patch added

comment:1 by Tobias Loew, 10 years ago

I appended a patch for the issue.

comment:2 by Joel de Guzman, 8 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.