]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/value.cpp
Type checking in value conversions
[libs/datafile.git] / source / value.cpp
diff --git a/source/value.cpp b/source/value.cpp
deleted file mode 100644 (file)
index 6d5e032..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-This file is part of libmspparser
-Copyright © 2006 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-#include <msp/error.h>
-#include "value.h"
-
-namespace Msp {
-namespace Parser {
-
-template<>
-std::string Value::get<std::string>() const
-{
-       if(type!=STRING)
-               throw TypeError("Value is not a string");
-       return data;
-}
-
-template<>
-const std::string &Value::get<const std::string&>() const
-{
-       if(type!=STRING)
-               throw TypeError("Value is not a string");
-       return data;
-}
-
-} // namespace Msp
-} // namespace Parser