|
Boost Users : |
Subject: [Boost-users] [SmartPtr] shared_ptr as a default value in function template
From: Igor R (boost.lists_at_[hidden])
Date: 2013-05-23 06:08:17
Hello,
In the wake of one of recent SO posts... The following doesn't compile
in MSVC10 (Boost 1.53):
#include <boost/shared_ptr.hpp>
#include <boost/make_shared.hpp>
template<class T>
void f(T item, boost::shared_ptr<int> name = boost::make_shared<int>())
{
}
int main()
{
f(0);
}
Is it a bug in make_shared or the above violates some Standard paragraph?
Thanks.
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