[Boost-bugs] [Boost C++ Libraries] #7378: lookup_one_property fails if property tag not found

Subject: [Boost-bugs] [Boost C++ Libraries] #7378: lookup_one_property fails if property tag not found
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-09-14 15:39:42


#7378: lookup_one_property fails if property tag not found
------------------------------------------------+---------------------------
 Reporter: Andreas Hehn <hehn@…> | Owner: dgregor
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: property_map
  Version: Boost 1.52.0 | Severity: Problem
 Keywords: lookup_one_property property_value |
------------------------------------------------+---------------------------
 {{{boost::lookup_one_property<PropertyList,Tag>::found}}} does not compile
 if {{{Tag}}} is not found in the {{{PropertyList}}}.

 The problem originates from the {{{lookup(...)}}} function definition in
 the template specialization
 {{{
   template <typename Tag, typename T, typename Base, typename PropName>
   struct lookup_one_property_internal<boost::property<Tag, T, Base>,
 PropName>: lookup_one_property_internal<Base, PropName> {
     private:
     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
     lookup(PL& prop, const PropName& tag)
 }}}
 which requires the base class to provide a {{{type}}} member.

 If the tag is not found the unspecialized template
 {{{
     template <typename PList, typename PropName, typename Enable = void>
     struct lookup_one_property_internal {BOOST_STATIC_CONSTANT(bool, found
 = false);};
 }}}
 will be instantiated as Base where the compiler can't find any {{{type}}}
 member.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7378>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC