Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70971 - sandbox/variadic_templates/libs/composite_storage/sandbox/pack
From: cppljevans_at_[hidden]
Date: 2011-04-04 14:47:41


Author: cppljevans
Date: 2011-04-04 14:47:39 EDT (Mon, 04 Apr 2011)
New Revision: 70971
URL: http://svn.boost.org/trac/boost/changeset/70971

Log:
Shows arbitrary order of args to pack::indexed_ctor_args_all_of_aligned.
run output:

composite_storage.leaf.test.exe
object_number=0
[[[ENTERING:one_of_maybe on non-class types TESTS
    ***composite_storage<one_of_maybe>:
    :size=4
    :alignment=4
    [[[ENTERING:default CTOR
        which=-1
        which=0
        t0=9
        which=1
        t1=8.5
    ]]]EXITING:default CTOR
]]]EXITING:one_of_maybe on non-class types TESTS
[[[ENTERING:one_of_maybe on class types TESTS
    ***composite_storage<one_of_maybe>:
    :size=8
    :alignment=4
    [[[ENTERING:default CTOR
        which=-1
        which=0
        t0=charvec_u<0>:id_get=2:v[0]=a
        which=1
        t1=charvec_u<1>:id_get=4:v[0]=a
        assign_test:
        which=-1
    ]]]EXITING:default CTOR
    [[[ENTERING:index_component CTOR
        which=1
    ]]]EXITING:index_component CTOR
    [[[ENTERING:index= CTOR
        which=0
        project=charvec_u<0>:id_get=11:v[0]=y
    ]]]EXITING:index= CTOR
]]]EXITING:one_of_maybe on class types TESTS
object_number=0
[[[ENTERING:all_of_aligned index_component DEMO
    ***indexed_ctor_args.arg:
    :project<index_0>=charvec_double<0>:id_get=12:v[0]=x:d=-100
    :project<index_1>=charvec_double<1>:id_get=13:v[0]=a:d=-1001
    :project<index_2>=charvec_double<2>:id_get=14:v[0]=z:d=-102
    :project<index_3>=charvec_double<3>:id_get=15:v[0]=a:d=1000.3
]]]EXITING:all_of_aligned index_component DEMO
final:object_number=0

Compilation finished at Mon Apr 4 13:41:30

Text files modified:
   sandbox/variadic_templates/libs/composite_storage/sandbox/pack/composite_storage.leaf.test.cpp | 23 ++++++++++++++++-------
   1 files changed, 16 insertions(+), 7 deletions(-)

Modified: sandbox/variadic_templates/libs/composite_storage/sandbox/pack/composite_storage.leaf.test.cpp
==============================================================================
--- sandbox/variadic_templates/libs/composite_storage/sandbox/pack/composite_storage.leaf.test.cpp (original)
+++ sandbox/variadic_templates/libs/composite_storage/sandbox/pack/composite_storage.leaf.test.cpp 2011-04-04 14:47:39 EDT (Mon, 04 Apr 2011)
@@ -137,19 +137,19 @@
 : charvec_u<I>
 {
     double d;
- charvec_double(char c,double _d)
- : charvec_u<I>(c)
- , d(_d)
+ charvec_double()
+ : d(-1000.0-double(I))
     {}
     charvec_double(char c)
     : charvec_u<I>(c)
- , d(-999.9)
+ , d(-100.0-double(I))
     {}
     charvec_double(double _d)
     : d(_d)
     {}
- charvec_double()
- : d(-99.9)
+ charvec_double(char c,double _d)
+ : charvec_u<I>(c)
+ , d(_d)
     {}
  private:
     charvec_double(charvec_double const&)
@@ -628,6 +628,7 @@
           , charvec_double<0>
           , charvec_double<1>
           , charvec_double<2>
+ , charvec_double<3>
>
         tagged_type
         ;
@@ -637,9 +638,16 @@
>
         ndx0
         ;
+ index
+ < index_numerals
+ , index_3
+ >
+ ndx3
+ ;
           tagged_type
         tagged_arg
- ( ndx0='x'
+ ( ndx3=double(1000.3) //show out-of-order intialization
+ , ndx0='x'
       #if 1
         , index<index_numerals,index_2>() = 'z'
       #else
@@ -653,6 +661,7 @@
           <<":project<index_0>="<<tagged_arg.project<index_0>()<<"\n"
           <<":project<index_1>="<<tagged_arg.project<index_1>()<<"\n"
           <<":project<index_2>="<<tagged_arg.project<index_2>()<<"\n"
+ <<":project<index_3>="<<tagged_arg.project<index_3>()<<"\n"
         ;
     }
 #endif


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