|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r74557 - sandbox/variadic_templates/sandbox/stepper/libs/array_stepper/examples
From: cppljevans_at_[hidden]
Date: 2011-09-24 15:48:17
Author: cppljevans
Date: 2011-09-24 15:48:16 EDT (Sat, 24 Sep 2011)
New Revision: 74557
URL: http://svn.boost.org/trac/boost/changeset/74557
Log:
Use template inc_dec_ator<ID> instead of always operator++
to show decrement operation.
Text files modified:
sandbox/variadic_templates/sandbox/stepper/libs/array_stepper/examples/index_stack_length_stride_crtp~demo.cpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
Modified: sandbox/variadic_templates/sandbox/stepper/libs/array_stepper/examples/index_stack_length_stride_crtp~demo.cpp
==============================================================================
--- sandbox/variadic_templates/sandbox/stepper/libs/array_stepper/examples/index_stack_length_stride_crtp~demo.cpp (original)
+++ sandbox/variadic_templates/sandbox/stepper/libs/array_stepper/examples/index_stack_length_stride_crtp~demo.cpp 2011-09-24 15:48:16 EDT (Sat, 24 Sep 2011)
@@ -19,7 +19,7 @@
std::cout<<"ID="<<id_names[ID]<<"\n";
unsigned space=lsos_v.space();
{
- for(unsigned node=0; node<space; ++node, ++lsos_v)
+ for(unsigned node=0; node<space; ++node, lsos_v.template inc_dec_ator<ID>())
{
std::cout<<"node["<<std::setw(2)<<node<<"]=";
std::cout<<lsos_v<<"\n";
@@ -42,6 +42,7 @@
lso_t::length_strides_t lss_v=lso_v.length_strides();
lsos_t lsos_v( lss_v.begin(), lss_v.end());
test_inc_dec<inc_ator>(lsos_v);
+ test_inc_dec<dec_ator>(lsos_v);
#if 1
typedef types_t::axis_t axis_t;
axis_t axis_v=2;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk