Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2008-08-15 19:20:26


on Fri Aug 15 2008, "Hicham Mouline" <hicham-AT-mouline.org> wrote:

> hello,
> technically, this is not a boost question.
> I am writing a library to be used by third-party developers.
> Internally, i use boost::mpl sequences.
> Joaquin wrote mpl sequences cross-product metafunctions that i use,
> i called them sequence2_cross_product and sequence3_cross_product
> for the x-product of 2 and 3 sequences.
>
> I put the metafunction in a separate header file. I don't intend to expose
> it to my clients.
>
> Is there an agreed convention/style as to where such a header file should lie?
> My namespace hierarchy reflects my directory structure, so this is like asking
> in which namespace should i put this metafunction.
> I would have like to see such metafunctions already in boost::mpl.,
> so should/can i highjack boost::mpl namespace in my header?

Bad idea, IMO.

> or put it at toplevel right below my namespace ?

You should put it in your own namespace.

HTH,

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net