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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user