2
0
mirror of https://github.com/boostorg/graph.git synced 2026-01-31 20:22:09 +00:00

Using lazy_enable_if to avoid "reference to void" errors for properties that are not found; fixes #7378

[SVN r80528]
This commit is contained in:
Jeremiah Willcock
2012-09-14 21:41:06 +00:00
parent adaa84d861
commit 076085fd29

View File

@@ -123,12 +123,14 @@ namespace boost {
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);
}