00001 #include <TooN/TooN.h> 00002 #include <TooN/helpers.h> 00003 00004 using namespace std; 00005 using namespace TooN; 00006 00007 template<class C> void type(const C&) 00008 { 00009 cout << __PRETTY_FUNCTION__ << endl; 00010 } 00011 00012 void make_a_copy_constructor_happen(const Vector<4>& v) 00013 { 00014 cout << "Pre CC\n"; 00015 Vector<4> v2(v); 00016 cout << "Post CC\n"; 00017 } 00018 00019 int main() 00020 { 00021 Vector<4> v1 = makeVector(1, 2, 3, 4); 00022 Vector<4> v2 = makeVector(5, 6, 7, 8); 00023 00024 make_a_copy_constructor_happen(v1); 00025 00026 cout << Ones + (v1 + v2)+2*Ones << endl; 00027 00028 v1.slice<0, 2>() /= 2; 00029 cout << v1 << endl; 00030 00031 type(Vector<2>() + Vector<2, int>()); 00032 } 00033