On Wed, 18 Nov 2009, John Peterson wrote:

On Wed, Nov 18, 2009 at 9:26 PM, Liu Kai <[email protected]> wrote:
Hi all,

 I find that things like string_to_enum and enum_to_string in src/utils
are exactly bi-direction map, which has been well implemented in boost
library. So why not use the boost::bimap to implement these
functionality, instead of implement the same thing by hand?

 I just want to know if the reason is boost::bimap has some potential
problems, or is it a historical reason?

We don't use boost at all in the library.  There are probably
thousands of places where we could and should.

Note also that boost::bimap postdates string_to_enum/enum_to_string by
a year or two.  Looks like Ben's options in 2005 were using
codeproject::bimap, or building his own bimap on top of
boost::multi_index_container...

I'm not trying to advocate a total Not-Invented-Here attitude, but
tracking APIs that might be still in flux is a pain.  That's
worthwhile for something like PETSc; not so much for a single little
lookup table.

Of course, that was 2005; this is 2009.  It looks like the Boost folks
have been happy with the bimap interface for a couple years now, and
they generally do very good work.
---
Roy
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to