$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] boost optional assignment
From: tolik levchik (endight_at_[hidden])
Date: 2012-08-17 07:35:39
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;
}