X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fvalue.h;h=bcddd6ed3aebb579256cd0a11061a76312a4a95c;hb=8a412367448c55916380ce7040ddbd0a75fa722e;hp=e2b9fb1c569782fcbc96dc9d687d9b48eb83388d;hpb=818ead7b6ccef1e4d2435cc959bc07f910fcde46;p=libs%2Fdatafile.git diff --git a/source/value.h b/source/value.h index e2b9fb1..bcddd6e 100644 --- a/source/value.h +++ b/source/value.h @@ -2,6 +2,7 @@ #define MSP_DATAFILE_VALUE_H_ #include +#include #include #include #include "type.h" @@ -17,12 +18,13 @@ private: public: template - Value(T d): + Value(T &&d): sig(TypeInfo::signature), - data(static_cast::Store>(d)) + data(static_cast::Store>(std::forward(d))) { } - Value(Symbol d): sig(TypeInfo::signature), data(d) { } + Value(const Symbol &d): sig(TypeInfo::signature), data(d) { } + Value(Symbol &&d): sig(TypeInfo::signature), data(std::move(d)) { } template typename TypeInfo::Load get() const @@ -34,8 +36,6 @@ private: T get_() const; }; -typedef std::vector ValueArray __attribute__((deprecated)); - template inline T Value::get_() const {