Boost logo

Boost Users :

Subject: Re: [Boost-users] use of boost::noncopyable ?
From: Igor R (boost.lists_at_[hidden])
Date: 2012-03-21 10:35:11


>> > It turns out that something in my code did want the assignment, so the
>> > class
>> > "did its job" but was totally unhelpful in telling me where in the code
>> > this
>> > was.
>>
>> To get more helpful error, declare a private copy-ctor & assignment
>> operator in your class - and you'll see who attempts to copy.
>
> I wonder if we should add an extra inheritance layer.  We would make a new
> noncopyable_inner class with the disabling code, then have the current
> noncopyable inherit from the new class.

I'm afraid, that won't help. This is a known MSVC issue, which they
don't want to fix:
http://connect.microsoft.com/VisualStudio/feedback/details/99186/diagnostic-in-compiler-generated-function-is-not-associated-with-the-triggering-line


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