Microsoft's std::vector uses a T & (without const) for copying, which
resolves to the templated constructor instead of the copy constructor
unless the former is disabled for that signature.
#define MSP_DATAFILE_VALUE_H_
#include <vector>
+#include <type_traits>
#include <msp/core/attributes.h>
#include <msp/core/meta.h>
#include <msp/core/variant.h>
public:
template<typename T>
- Value(T &&d):
+ Value(T &&d, typename std::enable_if<!std::is_same<typename std::remove_reference<T>::type, Value>::value, int>::type = 0):
sig(TypeInfo<T>::signature),
data(static_cast<typename TypeInfo<T>::Store>(std::forward<T>(d)))
{ }