Esempio n. 1
0
 value_t convert2(const container_t& c) {
     try {
         return c.operator value_t();
     }
     catch(const std::exception& e) {
         OH_FAIL("Unable to convert type '" << c.type().name()
             << "' to type '" << typeid(value_t).name() << "' - " << e.what());
     }
 }
Esempio n. 2
0
 ComplexLib::Grade convertGrade(const container_t& c) {
     if(c.type() == typeid(double))
         return ComplexLib::Grade(c.operator double());
     else
         RP_FAIL("unable to convert type '" << c.type().name() << "' to type 'ComplexLib::Grade'");
 }