Boost C++ Libraries: Ticket #6728: function_property_map https://svn.boost.org/trac10/ticket/6728 <p> A missing component in the property_maps library is an adapter for functions to property_maps. </p> <p> A working implementation under the Boost License can be found here: <a class="ext-link" href="https://github.com/bo0ts/property_map_extensions/blob/master/function_property_map.hpp"><span class="icon">​</span>https://github.com/bo0ts/property_map_extensions/blob/master/function_property_map.hpp</a> </p> <p> Features: type deduction when available, C++03 compatible, Problems: hacky way of specifying if either std::result_of or boost:result_of is to be used (boost::result_of does not work with lambdas) </p> <p> It would still require some testing. The required documentation should be minimal. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6728 Trac 1.4.3 philipp.moeller@… Fri, 23 Mar 2012 16:23:53 GMT component changed; owner set https://svn.boost.org/trac10/ticket/6728#comment:1 https://svn.boost.org/trac10/ticket/6728#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Douglas Gregor</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">property_map</span> </li> </ul> Ticket Jeremiah Willcock Fri, 23 Mar 2012 18:04:24 GMT owner, status changed https://svn.boost.org/trac10/ticket/6728#comment:2 https://svn.boost.org/trac10/ticket/6728#comment:2 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Douglas Gregor</span> to <span class="trac-author">Jeremiah Willcock</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket Jeremiah Willcock Fri, 23 Mar 2012 18:06:14 GMT <link>https://svn.boost.org/trac10/ticket/6728#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6728#comment:3</guid> <description> <p> Please check the code and test I'm about to attach. I changed to <code>boost::result_of</code>; any bugs in it regarding lambdas are its maintainer's problem and should be fixed there. I also removed the perfect forwarding code because it was broken (see <code>add1</code> and the uses of it in the test code). </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jeremiah Willcock</dc:creator> <pubDate>Fri, 23 Mar 2012 18:06:42 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/6728 https://svn.boost.org/trac10/ticket/6728 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">function_property_map.hpp</span> </li> </ul> Ticket Jeremiah Willcock Fri, 23 Mar 2012 18:07:01 GMT attachment set https://svn.boost.org/trac10/ticket/6728 https://svn.boost.org/trac10/ticket/6728 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">function_property_map_test.cpp</span> </li> </ul> Ticket philipp.moeller@… Fri, 23 Mar 2012 18:26:37 GMT <link>https://svn.boost.org/trac10/ticket/6728#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6728#comment:4</guid> <description> <p> Thanks for fixing those problems. </p> <p> boost::result_of is unlikely to use the native decltype facilities for some time. This is due to an non-conforming decltype implementation in some compilers and the breakage that enabling this feature caused in Boost. Your version will not be usable with lambdas until this is fixed, but if you deem this acceptable over my hacks to get it working that is alright. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jeremiah Willcock</dc:creator> <pubDate>Fri, 23 Mar 2012 18:42:39 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6728#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6728#comment:5</guid> <description> <p> I am annoyed by the <code>boost::result_of</code> bug too; I use <code>BOOST_RESULT_OF_USE_DECLTYPE</code> to work around the bug when I use C++11 (there are enough parts of Boost that use <code>result_of</code> that I can't avoid it). </p> </description> <category>Ticket</category> </item> <item> <author>philipp.moeller@…</author> <pubDate>Fri, 23 Mar 2012 18:49:58 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6728#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6728#comment:6</guid> <description> <p> But this gets unmanageable and reincluding is not possible thanks to the include guards. I guess there is nothing we can do here without making it a hack. I suggest to leave it the way it is and have users manage BOOST_RESULT_OF_USE_DECLTYPE themselves. The issue can be closed as far as I'm concerned. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jeremiah Willcock</dc:creator> <pubDate>Fri, 23 Mar 2012 19:35:55 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6728#comment:7 https://svn.boost.org/trac10/ticket/6728#comment:7 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/77506" title="Added function_property_map based on code from Philipp Moeller; fixes #6728">[77506]</a>) Added function_property_map based on code from Philipp Moeller; fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6728" title="#6728: Feature Requests: function_property_map (closed: fixed)">#6728</a> </p> Ticket Michel Morin <mimomorin@…> Sat, 24 Mar 2012 08:50:03 GMT <link>https://svn.boost.org/trac10/ticket/6728#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6728#comment:8</guid> <description> <p> I'll make some proposal about decltype-based <code>boost::result_of</code> on devel ML. </p> </description> <category>Ticket</category> </item> </channel> </rss>