#include <vector>
#include <msp/core/meta.h>
#include <msp/core/variant.h>
-#include "except.h"
#include "type.h"
namespace Msp {
Value(Symbol d): sig(TypeInfo<Symbol>::signature), data(d) { }
template<typename T>
- typename RemoveReference<T>::Type get() const
+ typename TypeInfo<T>::Load get() const
{ return get_<typename TypeInfo<T>::Store>(); }
char get_signature() const { return sig; }
template<typename T>
inline T Value::get_() const
{
- if(sig!=TypeInfo<T>::signature)
- throw TypeError("Type mismatch");
-
return data.value<typename TypeInfo<T>::Store>();
}
{
if(sig==IntType::signature)
return data.value<IntType::Store>();
- else if(sig!=FloatType::signature)
- throw TypeError("Type mismatch");
-
- return data.value<FloatType::Store>();
+ else
+ return data.value<FloatType::Store>();
}
} // namespace DataFile