Boost logo

Boost Users :

Subject: [Boost-users] boost::array and operator< on private type (which is a pair) for using std algos
From: Hicham Mouline (hicham_at_[hidden])
Date: 2009-04-02 11:36:47


Hello,
I'm not sure this is specific about boost::array... I apologize if it is not
boost specific.

I have this code
http://codepad.org/h9uFoI1I

This compiles under g++4.0

1. I find it strange that it does given that EntryType is a __private__ type
inside C<T1,T2>.
2. It doesn't do what I expect: my operator< is defined in std namespace but
is never called (i did this because with std::pair comes < operators frm the
std namespace)
I don't want to define operator< for all pairs, just for contexts (member
functions of C)
which use EntryType.
Is this because I typedef EntryType?

rds,


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