1 //#include "roast/thread/thread_pool.hpp"
2 #include "roast/std/foreach.hpp"
3 #include "roast/container/any_iterator.hpp"
4 #include "roast/container/stl_iterator_to_roast.hpp"
8 ////////////////////////////////////////////////////////////////////////
11 any_iterator<T> get_iterator( ::std::vector<T>& ary )
13 return new _attach_iterator_base<T,
14 _stllike_uni_iterator_to_roast_impl< ::std::vector<T> >
15 >( _stllike_uni_iterator_to_roast_impl< ::std::vector<T> >(ary) );
22 class hoge2 : public hoge
28 /*hoge2(const struct hoge &h){
29 const struct hoge2 &p = h;
31 ~hoge2(){ printf("hoge2 Release.\n"); }
32 hoge2(int a_,int c_){ a = a_; c = c_; }
35 void zzz(const hoge &l)
37 hoge2 &bq1 = (hoge2&)l;
38 printf("%d, %d\n", bq1.a, bq1.c);
41 using namespace roast;
45 hoge *ddd = &hoge2(10,20);
46 hoge2 *bq2 = (hoge2*)ddd;
47 printf("%d, %d\n", bq2->a, bq2->c);
49 hoge &bq = hoge2(10,20);
50 printf("Sizeof = %d\n", sizeof(bq) );
51 hoge2 &bq1 = (hoge2&)bq;
52 printf("%d, %d\n", bq1.a, bq1.c);*/
54 /*std::vector<int> vi;
60 any_iterator<int> it = get_iterator(vi);
66 ROAST_FOREACH(int x, vi)
72 /*for(size_t i=0; i<vi.size(); i++)
74 printf("%d\n", vi[i]);