
Hello, In trying to use noncopyable types in a fusion vector I realized I can't - GCC 4.0.1 complained about, e.g.: fusion::vector<boost::signal<void()> > test; // error: 'boost::noncopyable_::noncopyable::noncopyable(const boost::noncopyable_::noncopyable&)' is private A related question was asked before by Michael Marcin but I didn't find a response: http://lists.boost.org/Archives/boost/2007/10/128868.php Is there a way to make vector (or any other sequence container) hold noncopyable types, or do I need to implement a noncopyable_vector? Thanks for any suggestions! Stjepan

Consider using boost::ref or boost::cref (constant version). David On Thu, Feb 7, 2008 at 4:38 AM, Stjepan Rajko <stipe@asu.edu> wrote:
Hello,
In trying to use noncopyable types in a fusion vector I realized I can't - GCC 4.0.1 complained about, e.g.:
fusion::vector<boost::signal<void()> > test; // error: 'boost::noncopyable_::noncopyable::noncopyable(const boost::noncopyable_::noncopyable&)' is private
A related question was asked before by Michael Marcin but I didn't find a response: http://lists.boost.org/Archives/boost/2007/10/128868.php
Is there a way to make vector (or any other sequence container) hold noncopyable types, or do I need to implement a noncopyable_vector?
Thanks for any suggestions!
Stjepan _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Thu, Feb 14, 2008 at 2:41 AM, David Rodríguez Ibeas <dibeas@ieee.org> wrote:
On Thu, Feb 7, 2008 at 4:38 AM, Stjepan Rajko <stipe@asu.edu> wrote:
Hello,
In trying to use noncopyable types in a fusion vector I realized I can't - GCC 4.0.1 complained about, e.g.:
[snip]
Is there a way to make vector (or any other sequence container) hold noncopyable types, or do I need to implement a noncopyable_vector?
Consider using boost::ref or boost::cref (constant version).
hmm hmm hmm... that's a good suggestion, but I actually need the fusion::vector to hold the object, and ideally to hold it as itself (rather than in maybe a boost::shared_ptr). But something like a smart pointer might do the trick for now. Thanks, Stjepan
participants (2)
-
David Rodríguez Ibeas
-
Stjepan Rajko