|
Boost : |
From: Vaclav Vesely (vaclav.vesely_at_[hidden])
Date: 2006-03-10 09:02:31
Hi,
is there any reason for missing in_place_factory without arguments? I would
like to write
optional<my_class> mc(in_place());
I've wrote the code for this. But I can't modify the macro hell in
"in_place_factory.hpp".
Regards,
Vaclav
class in_place_factory0: public in_place_factory_base
{
public:
in_place_factory0()
{}
template<class T>
void apply(void* address) const
{
new(address) T();
}
};
in_place_factory0 in_place()
{
return in_place_factory0();
}
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk