diff --git a/avogadro/core/variant-inline.h b/avogadro/core/variant-inline.h index 6706e4cf5e..16836f4dcb 100644 --- a/avogadro/core/variant-inline.h +++ b/avogadro/core/variant-inline.h @@ -21,11 +21,13 @@ inline Variant::Variant(T v) : m_type(Null) setValue(v); } +template <> inline Variant::Variant(const char* v) : m_type(String) { m_value.string = new std::string(v); } +template <> inline Variant::Variant(const MatrixXf& v) : m_type(Matrix) { MatrixX* m = new MatrixX(v.rows(), v.cols()); diff --git a/avogadro/core/variant.h b/avogadro/core/variant.h index c2b08bd56c..84eda3186d 100644 --- a/avogadro/core/variant.h +++ b/avogadro/core/variant.h @@ -48,12 +48,6 @@ class AVOGADROCORE_EXPORT Variant template Variant(T value); - /** Creates a std::string variant to store @p value */ - Variant(const char* value); - - /** Creates a MatrixX variant to store @p value */ - Variant(const MatrixXf& value); - /** Creates a new copy of @p variant. */ inline Variant(const Variant& variant);