|
Boost : |
From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2007-12-18 16:12:55
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tuesday 18 December 2007 13:53 pm, Howard Hinnant wrote:
> Some of this is C++0X, like the ability to return movable but non-
> copyable items from factory functions. Is this getting close to what
> you were wanting to do?
I think what I can do is just put a bunch of overloaded template
constructors in my wrapper, sort of like
template<typename Mutex>
class my_mutex_wrapper
{
Mutex mut_;
public:
my_mutex_wrapper()
{//...}
template<typename A1>
my_mutex_wrapper(A1 a1): mut_(a1)
{//...}
template<typename A1, typename A2>
my_mutex_wrapper(A1 a1, A2 a2): mut_(a1, a2)
{//...}
// ...
template<typename A1, typename A2, /*...*/, typename An>
my_mutex_wrapper(A1 a1, A2 a2, /*...*/, An an): mut_(a1, a2, /*...*/, an)
{//...}
// ...
};
One of the constructors will probably be useable by the Mutex template type,
and the invalid ones won't instantiated.
- --
Frank
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFHaDfY5vihyNWuA4URAokTAJ9mO+lt43gXO4Az4sgJ/IlBsV6z/wCeOSRp
84NqtFb3jMLPcFPgoLfQdqY=
=DMu/
-----END PGP SIGNATURE-----
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk