10 virtual int value() = 0;
13 template<
typename W >
14 struct TMorph :
Morph< TMorph< W >, W, TInterface >
17 TMorph(
const W &w ) :
Morph< TMorph, W, TInterface >( w ) {}
19 virtual int value() {
return this->wrapped().value(); }
22 struct T :
Amorph< T, TInterface >
25 :
Amorph< T, TInterface >( i ) {}
29 return this->implementation()->value();
34 virtual int value()
const {
return 1; }
36 return value() <= o.value();
42 virtual int value()
const {
return 3; }
46 int value()
const {
return 2; }
48 return value() <= o.value();
52 struct ExtractT1Value {
53 typedef int result_type;
54 typedef T1 argument_type;
55 int operator()(
const T1 &t ) {
60 template<
typename T >
61 TMorph< T > testMorph( T t ) {
62 return TMorph< T >( t );
71 T t = testMorph( t1 );
bool operator<=(const T &a, const std::set< T > &b)
Definition: operators.h:220
An interface implemented by all morph classes.
Definition: amorph.h:91
void Test
Definition: test.h:178
#define assert_eq(x, y)
Definition: test.h:33