| metaprogramming/conditional-declaration/prog1.cc - Use of class Point<double> with move - OK. | Lecture 6 - slide 36 : 40 Program 3 |
// Compiles and runs, because double (in Point<double>) is a floating point type.
#include <iostream>
#include <string>
#include "point.cc"
int main(){
Point<double> p1,
p2(1,2);
p1.move(1,1); // OK
p2.move(2,2); // OK
std::cout << "p1: " << p1 << std::endl; // (1,1)
std::cout << "p2: " << p2 << std::endl; // (3,4)
}