$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] metafunction question
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2010-05-11 14:35:26
Le 11/05/2010 19:30, John Dlugosz wrote:
> Consider a class derived from an STL collection.
You should never do that.
> It features a special find(x) function that works with his search criteria. It returns an iterator into the collection. There are two forms needed:
> iterator find(x);
> const_iterator find(x) const;
> and the annoying part is that they contain exactly the same code. The implementation uses the inherited iterators and collection features to do the finding.
>
> The larger question is, is there a better way to approach that?
Macros?