Subject: Re: [boost] boost::noncopyable errors are difficult to diagnose on MSVC
From: Gottlob Frege (gottlobfrege_at_[hidden])
Date: 2009-11-06 22:25:30
On Fri, Nov 6, 2009 at 5:13 PM, Beman Dawes <bdawes_at_[hidden]> wrote:
> On Fri, Nov 6, 2009 at 1:17 PM, Emil Dotchevski
> <emildotchevski_at_[hidden]> wrote:
>> On Fri, Nov 6, 2009 at 9:44 AM, Zachary Turner <divisortheory_at_[hidden]> wrote:
>>> Is there anything that can be done to improve the error messages generated
>>> by the compiler when a copy fails to be made due to a boost::noncopyable?
>> Easy cure is to spell out the private declarations for the copy
>> constructor and the assignment operator "by hand". We all know that
>> this spells "non-copyable".
> Because of C++0x deleted functions, the idiom for noncopyable is going
> to change.
Interesting stuff, however...
I'm not sure if any of that will help the errors. I haven't tried any
experiments, but It looks to me that even if the compiler tells you
exactly what class is not copyable, it doesn't tell you where the
attempted copy is taking place.
And I'm not sure if anything but a compiler fix will make it better.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk