Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2002-01-31 10:02:23

On Thu, 31 Jan 2002, bill_kempf wrote:
willia> OK, in this particular case I'd be open to that. If nothing else it
willia> eliminates the concern for not supporting all operations of the
willia> traits class. However, this isn't the "typical" solution in C++
willia> design that I've seen, and as free functions the above operations
willia> appear to be more open to misuse. In otherwords, a "newbie" is
willia> likely to see:
willia> template <typename Mutex>
willia> void lock(Mutex& m);

By free function I didn't mean function template, I was thinking lock()
functions overloaded on the particular mutex types.

willia> and use it then he is if it's wrapped in a traits class. If that's
willia> the case, why not just expose these methods as public methods in the
willia> Mutex?

Good question, why not? Perhaps you should post your design goals for this
component. I can guess at them... but I might be wrong and so might be


 Jeremy Siek
 Ph.D. Student, Indiana Univ. B'ton email: jsiek_at_[hidden]
 C++ Booster ( office phone: (812) 855-3608

Boost list run by bdawes at, gregod at, cpdaniel at, john at