Boost logo

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

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)

View this message in context:
Sent from the Boost - Dev mailing list archive at

Boost list run by bdawes at, gregod at, cpdaniel at, john at