28 #include "type_id_map.hpp"
29 #include <boost/static_assert.hpp>
30 #include <boost/numeric/conversion/cast.hpp>
32 #include "../error/exceptions.hpp"
33 #include "../error/exception_utils.hpp"
34 #include "type_info.hpp"
35 #include "unchecked_convertible.hpp"
36 #include "checked_convertible.hpp"
37 #include "convertible.hpp"
38 #include "type_conversion.hpp"
69 return boost::numeric_cast<TT>(value);
127 BT real = boost::numeric_cast<BT>(value);
129 return std::complex<BT>(real,0);
159 BTT real = boost::numeric_cast<BTT>(value.real());
160 BTT imag = boost::numeric_cast<BTT>(value.imag());
162 return std::complex<BTT>(real,imag);
180 bool unchecked_convertible=
true
229 catch(
const boost::numeric::positive_overflow &error)
232 "Source value exceeded range of target type!");
234 catch(
const boost::numeric::negative_overflow &error)
237 "Source value exceeded range of target type!");
242 "Unknown error during type conversion!");
275 "Types are in no way convertible!");
data range error
Definition: exceptions.hpp:616
#define EXCEPTION_RECORD
macro creating an instance of ExceptionRecord
Definition: exceptions.hpp:48
static TT convert(const TT &value)
perform conversion
Definition: convert.hpp:94
data type error
Definition: exceptions.hpp:544
static target_type convert(const source_type &)
static conversion function
Definition: utils.hpp:77
static std::complex< BTT > convert(const std::complex< BST > &value)
perform conversion
Definition: convert.hpp:157
Definition: add_op.hpp:29
static T convert(const S &value)
perform conversion
Definition: convert.hpp:191
static std::complex< BT > convert(const ST &value)
perform conversion
Definition: convert.hpp:125
simple unchecked strategy
Definition: convert.hpp:182
static T convert(const S &value)
perform conversion
Definition: convert.hpp:223
T convert(const S &source)
type conversion function template
Definition: convert.hpp:272
converter class
Definition: utils.hpp:61
check if two types are convertible
Definition: convertible.hpp:46
simple numeric converter
Definition: convert.hpp:59
type erasure for POD data
Definition: value.hpp:46
static TT convert(const ST &value)
perform conversion
Definition: convert.hpp:67