/* This is test code for SmarterP. * Compile this with: g++ -ggdb TestSmarterP.C * Do not add this to a production program. */ #include "SmarterP.h" #include #include #include SmarterCP< int > make(int a, int b) { const SmarterP< int > result(NULL, a); (*result) += b; return result; //return SmarterP< int >(nullptr, a+b); } SmarterP< int > makeNonConst(int a) { const SmarterP< int > result(NULL, a); (*result) *= a; return result; } std::shared_ptr< int16_t > sp; int main(int, char **) { std::cout<