Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80528 - trunk/boost/pending
From: jewillco_at_[hidden]
Date: 2012-09-14 17:41:07


Author: jewillco
Date: 2012-09-14 17:41:06 EDT (Fri, 14 Sep 2012)
New Revision: 80528
URL: http://svn.boost.org/trac/boost/changeset/80528

Log:
Using lazy_enable_if to avoid "reference to void" errors for properties that are not found; fixes #7378
Text files modified:
   trunk/boost/pending/property.hpp | 6 ++++--
   1 files changed, 4 insertions(+), 2 deletions(-)

Modified: trunk/boost/pending/property.hpp
==============================================================================
--- trunk/boost/pending/property.hpp (original)
+++ trunk/boost/pending/property.hpp 2012-09-14 17:41:06 EDT (Fri, 14 Sep 2012)
@@ -123,12 +123,14 @@
     typedef lookup_one_property_internal<Base, PropName> base_type;
     public:
     template <typename PL>
- static typename enable_if<is_same<PL, boost::property<Tag, T, Base> >, typename base_type::type&>::type
+ static typename lazy_enable_if<is_same<PL, boost::property<Tag, T, Base> >,
+ add_reference<typename base_type::type> >::type
     lookup(PL& prop, const PropName& tag) {
       return base_type::lookup(prop.m_base, tag);
     }
     template <typename PL>
- static typename enable_if<is_same<PL, boost::property<Tag, T, Base> >, const typename base_type::type&>::type
+ static typename lazy_enable_if<is_same<PL, boost::property<Tag, T, Base> >,
+ add_reference<const typename base_type::type> >::type
     lookup(const PL& prop, const PropName& tag) {
       return base_type::lookup(prop.m_base, tag);
     }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk