On Sun, Mar 28, 2010 at 8:10 PM, Han-Wen Nienhuys <[email protected]> wrote:
> On Sun, Mar 28, 2010 at 8:54 PM, Patrick McCarty <[email protected]> wrote:
>>
>> http://codereview.appspot.com/819041/show
>>
>> Is this the correct way to return an element from a map?
>
> It looks OK.  Within google we have a function
>
>  template<class T>
>  bool FindCopy(T const& container, const T::key_type& key,
> T::value_type * dest)
>
> reduce the boilerplate involved with extracting values from STL maps.
> You could introduce something like that, and rewrite other lookup code
> like that.

Interesting!

I'll push the patch as-is for now, and I'll plan on writing a
convenience template to use when I have a better grasp of how to
implement it.

Thanks,
Patrick


_______________________________________________
lilypond-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to