From 8a1daa735bca67890b7345117edc99ddd4fa24af Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Mon, 23 Apr 2001 22:27:34 +0000 Subject: [PATCH] vc++ workaround [SVN r9949] --- include/boost/pending/detail/property.hpp | 29 +++++++++++++++++++---- include/boost/pending/property.hpp | 2 ++ 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/include/boost/pending/detail/property.hpp b/include/boost/pending/detail/property.hpp index 80cd2ce1..ababd529 100644 --- a/include/boost/pending/detail/property.hpp +++ b/include/boost/pending/detail/property.hpp @@ -40,10 +40,12 @@ namespace boost { return p.m_value; } }; - template <> - struct property_value_dispatch<0> { - template + template + struct property_value_end { + template class result { typedef T type; }; + + template static T& get_value(Property& p, T* t, Tag tag) { typedef typename Property::next_type Next; typedef typename Next::tag_type Next_tag; @@ -51,7 +53,7 @@ namespace boost { return property_value_dispatch ::get_value(static_cast(p), t, tag); } - template + template static const T& const_get_value(const Property& p, T* t, Tag tag) { typedef typename Property::next_type Next; typedef typename Next::tag_type Next_tag; @@ -59,6 +61,11 @@ namespace boost { return property_value_dispatch ::const_get_value(static_cast(p), t, tag); } + }; + template <> + struct property_value_end { + template class result { typedef detail::error_property_not_found type; }; + // Stop the recursion and return error template static detail::error_property_not_found& @@ -74,6 +81,20 @@ namespace boost { } }; + template <> + struct property_value_dispatch<0> { + template + static typename property_value_end::template result::type& + get_value(Property& p, T* t, Tag tag) { + return property_value_end::get_value(p, t, tag); + } + template + static const typename property_value_end::template result::type& + const_get_value(const Property& p, T* t, Tag tag) { + return property_value_end::const_get_value(p, t, tag); + } + }; + template struct build_property_tag_value_alist { diff --git a/include/boost/pending/property.hpp b/include/boost/pending/property.hpp index 9bc61aff..02fda9b7 100644 --- a/include/boost/pending/property.hpp +++ b/include/boost/pending/property.hpp @@ -9,6 +9,8 @@ namespace boost { typedef no_property tag_type; typedef no_property next_type; typedef no_property value_type; + enum { num = 0 }; + typedef void kind; }; template struct property : public Base {