|
Boost : |
Subject: [boost] [Property Map] put_get_helper, keys are passed by value
From: ilker (busesbitermi_at_[hidden])
Date: 2013-04-29 10:32:47
Hello,
I require a pm which returns passed key (itself or a 'part' of it) as mapped
value. For this purpose I wrote another helper since boost::put_get_helper's
put function passes keys by value.
// Pasted as a reminder
template <class PropertyMap, class Reference, class K, class V>
inline void
put(const put_get_helper<Reference, PropertyMap>& pa, K k, const V& v)
{
static_cast<const PropertyMap&>(pa)[k] = v;
}
Is there any way to accomplish this by not introducing another custom helper
? (may be there already something similar exists in boost)
Thanks.
-- View this message in context: http://boost.2283326.n4.nabble.com/Property-Map-put-get-helper-keys-are-passed-by-value-tp4646293.html Sent from the Boost - Dev mailing list archive at Nabble.com.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk