// Example 7-18: Declaring and defining a template.
// point.h
#ifndef POINT_H
#define POINT_H

#include "config.h"

#ifdef HAS_EXPORT
 #define EXPORT export
#else
 #define EXPORT
#endif

EXPORT template<typename T>
class point {
public:
  point(T a, T b);
  point();
  T x() const { return x_; }
  T y() const { return y_; }
private:
  T x_, y_;
};

 #ifdef NEED_TEMPLATE_DEFINITIONS
  #include "point.cc"
 #endif
#endif // POINT_H
