changeset 13733:b1186adb567e

Add dummy template specializations with a return value. * ov.h (DEF_DUMMY_VALUE_EXTRACTOR): New macro. Use it for specialization with char and octave_value.
author Michael Goffioul <michael.goffioul@gmail.com>
date Thu, 20 Oct 2011 12:54:52 +0100
parents f8bef53122c8
children 28ddb3150943
files src/ov.h
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ov.h	Thu Oct 20 12:54:46 2011 +0100
+++ b/src/ov.h	Thu Oct 20 12:54:52 2011 +0100
@@ -1371,4 +1371,13 @@
 DEF_VALUE_EXTRACTOR (SparseBoolMatrix, sparse_bool_matrix)
 #undef DEF_VALUE_EXTRACTOR
 
+#define DEF_DUMMY_VALUE_EXTRACTOR(VALUE,DEFVAL) \
+template<> \
+inline VALUE octave_value_extract<VALUE> (const octave_value& v) \
+  { assert (false); return DEFVAL; }
+
+DEF_DUMMY_VALUE_EXTRACTOR (char, 0)
+DEF_DUMMY_VALUE_EXTRACTOR (octave_value, octave_value ())
+#undef DEF_DUMMY_VALUE_EXTRACTOR
+
 #endif