
17 Aug
2012
17 Aug
'12
5:35 a.m.
The following code gives me compilation error. With const reference it's ok. Is it right behaviour? #include <boost/optional.hpp> #include <boost/shared_ptr.hpp> struct foo{ // foo(int const& of) good foo(int& of) // error {} }; int main(){ boost::shared_ptr<int> ptr; boost::optional<foo> opt; opt = *ptr; }