#define MSP_DATAFILE_VALUE_H_
#include <vector>
+#include <msp/core/attributes.h>
#include <msp/core/meta.h>
#include <msp/core/variant.h>
#include "type.h"
public:
template<typename T>
- Value(T d):
+ Value(T &&d):
sig(TypeInfo<T>::signature),
- data(static_cast<typename TypeInfo<T>::Store>(d))
+ data(static_cast<typename TypeInfo<T>::Store>(std::forward<T>(d)))
{ }
- Value(Symbol d): sig(TypeInfo<Symbol>::signature), data(d) { }
+ Value(const Symbol &d): sig(TypeInfo<Symbol>::signature), data(d) { }
+ Value(Symbol &&d): sig(TypeInfo<Symbol>::signature), data(std::move(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; }
T get_() const;
};
-typedef std::vector<Value> ValueArray __attribute__((deprecated));
-
template<typename T>
inline T Value::get_() const
{