$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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
}