|
Boost : |
From: JOAQUIN LOPEZ MU?Z (joaquin_at_[hidden])
Date: 2005-07-29 11:29:31
----- Mensaje original -----
De: Joaquin M Lopez Munoz <joaquin_at_[hidden]>
Fecha: Viernes, Julio 29, 2005 5:28 pm
Asunto: Re: [boost] Interest in an ODBC library?
>
> template<typename Element>
> void reverse_dump(IBidirectionalContainer<Element> i)
> {
> std::copy(
> i.rbegin(),i.rend(),
> std::ostream_iterator<Element>(std::cout));
> }
Thinking about it some more, we could really
use the version of reverse_dump in the static case
also for the dynamic situation:
template<typename Index>
void reverse_dump(const Index& i)
{
std::copy(
i.rbegin(),i.rend(),
std::ostream_iterator<typename Index::value_type>(std::cout));
}
In the dynamic case, reverse_dump would be then instantiated as
reverse_dump<IBidirectionalContainer<Element> >.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk