|
Boost Users : |
Subject: [Boost-users] Boost.Factory argument by reference
From: gast128 (gast128_at_[hidden])
Date: 2012-03-26 11:36:48
Hello all,
does anyone know if Boost.Factory can be tweaked to use const& instead of
references, e.g.:
struct Bla
{
Bla(int n){}
};
void Foo()
{
boost::factory<Bla*> fac;
int i = 1;
boost::scoped_ptr<KTestBase> ptr2(fac(i));
boost::scoped_ptr<KTestBase> ptr2(fac(2)); //compile error
}
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