|
Boost : |
From: Fredrik Blomqvist (fredrik_blomqvist_at_[hidden])
Date: 2005-02-14 09:10:18
This made me remember my own old post about tuples & pairs:
http://lists.boost.org/MailArchives/boost/msg64193.php
i.e to make the tuple::get<> accessor support pairs also.
(actual patches: http://lists.boost.org/MailArchives/boost/msg05245.php)
I spoke to Jaakko about this at the time and he was postivite, but it seems
it ended up in the backlog.. Myself I almost forgot about it during the
summer.
Perhaps this could be reconsidered?
Regards
// Fredrik Blomqvist
John Maddock wrote:
> The following simple patch to tuple_basic.hpp allows tuples to be
> constructed from std::pairs (there is already an assignment operator,
> but
> the copy constructor is missing for some reason, and is required for
> TR1 conformity).
>
> RCS file: /cvsroot/boost/boost/boost/tuple/detail/tuple_basic.hpp,v
> retrieving revision 1.28
> diff -r1.28 tuple_basic.hpp
> 627a628,636
>> template <class T, class U>
>> tuple(const std::pair<T, U>& p)
>> : inherited(p.first, p.second, detail::cnull(), detail::cnull(),
>> detail::cnull(), detail::cnull(), detail::cnull(),
>> detail::cnull(), detail::cnull(), detail::cnull())
>> {
>> BOOST_STATIC_ASSERT(length<tuple>::value == 2);// check_length =
>> 2 }
>>
>
> Is it acceptable to add this?
>
> Many thanks,
>
> John Maddock.
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk