// proptest.c
#include <iostream>
#include "property.h"

class foo
{
  int a;
 public:
  property<int, foo, &foo::a> x;
  foo() : a(0), x(*this) {};
  friend ostream& operator<<(ostream &os, const foo &f) {
    return os << "foo<" << f.x << ">";
  }
};

int main()
{
  foo f;
  cout << f << endl;
  f.x = 10;
  cout << f << endl;
}