/* * recast.h * * Created on: Jun 26, 2012 * Author: utke */ #ifndef _RECAST_H_ #define _RECAST_H_ #ifdef HAVE_CONFIG_H #include #else #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" #endif #if !defined(_HAVE_ADOLC_) || defined(_WRAPPERS_) template To reCast(const From& from) { return (To)from; } #else template struct ForPartialSpecialization { static To reCast(const From& from ) { return (To) from;} }; template To reCast(const From& from) { return ForPartialSpecialization::reCast(from); } /** * partial specialization */ template struct ForPartialSpecialization { static To reCast(const adouble& from ) { return (To) (from.getValue());} }; #endif #endif