Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80582 - trunk/boost/pending
From: jewillco_at_[hidden]
Date: 2012-09-18 14:20:16


Author: jewillco
Date: 2012-09-18 14:20:15 EDT (Tue, 18 Sep 2012)
New Revision: 80582
URL: http://svn.boost.org/trac/boost/changeset/80582

Log:
Added more enable_ifs to try to get code working on VC++
Text files modified:
   trunk/boost/pending/property.hpp | 10 ++++++++--
   1 files changed, 8 insertions(+), 2 deletions(-)

Modified: trunk/boost/pending/property.hpp
==============================================================================
--- trunk/boost/pending/property.hpp (original)
+++ trunk/boost/pending/property.hpp 2012-09-18 14:20:15 EDT (Tue, 18 Sep 2012)
@@ -94,8 +94,14 @@
     private: \
     typedef lookup_one_property_internal<Base, BOOST_JOIN(kind, _bundle_t)> base_type; \
     public: \
- static typename base_type::type& lookup(property<Tag, T, Base>& p, BOOST_JOIN(kind, _bundle_t)) {return base_type::lookup(p.m_base, BOOST_JOIN(kind, _bundle_t)());} \
- static const typename base_type::type& lookup(const property<Tag, T, Base>& p, BOOST_JOIN(kind, _bundle_t)) {return base_type::lookup(p.m_base, BOOST_JOIN(kind, _bundle_t)());} \
+ template <typename BundleTag> \
+ static typename lazy_enable_if_c<(base_type::found && (is_same<BundleTag, BOOST_JOIN(kind, _bundle_t)>::value)), \
+ add_reference<typename base_type::type> >::type \
+ lookup(property<Tag, T, Base>& p, BundleTag) {return base_type::lookup(p.m_base, BOOST_JOIN(kind, _bundle_t)());} \
+ template <typename BundleTag> \
+ static typename lazy_enable_if_c<(base_type::found && (is_same<BundleTag, BOOST_JOIN(kind, _bundle_t)>::value)), \
+ add_reference<const typename base_type::type> >::type \
+ lookup(const property<Tag, T, Base>& p, BundleTag) {return base_type::lookup(p.m_base, BOOST_JOIN(kind, _bundle_t)());} \
   }; \
 
   BGL_DO_ONE_BUNDLE_TYPE(vertex)


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