BIND 10 #2144: add nonassignable super class
BIND 10 Development
do-not-reply at isc.org
Wed Mar 20 21:18:59 UTC 2013
#2144: add nonassignable super class
-------------------------------------+-------------------------------------
Reporter: fdupont | Owner:
Type: enhancement | UnAssigned
Priority: medium | Status:
Component: Unclassified | reviewing
Keywords: | Milestone:
Sensitive: 0 | Sprint-20130402
Sub-Project: DNS | Resolution:
Estimated Difficulty: 2 | CVSS Scoring:
Total Hours: 0 | Defect Severity: N/A
| Feature Depending on Ticket:
| Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
Comment (by jinmei):
'''general'''
I first created a new branch from the original trac2144 and rebased it
on the latest master, as there have been many changes since the
original branch. The new branch is trac2144-2. I suggest we made
further changes on this new branch (and we should probably just remove
the old one to avoid confusion).
I've not examined all cases where noncopyable or nonassignable is
newly introduced to confirm they are really necessary and whether
noncopyable/nonassignable is the best choice (especially because my
compiler doesn't warn about the things reported in this ticket). It's
also possible that there are some new cases where noncopyable or
nonassignable would now be needed.
In addition to conflict resolution, I made some other cleanups in my
own commits. 5b4d247 should be trivial, and I believe the rest is not
problematic, but you may want to check them.
'''nonassignable.h and noncopyable.h'''
- First off: do we need our own noncopyable, if it's just a copy of
Boost?
- Please add documentation: brief description of what it is, the
purpose of these classes, in which case we should use which, and
why, etc.
- Shouldn't we also copy Boost copyright?
{{{#!cpp
/// From boost/noncopyable.hpp
}}}
even though the definition is quite trivial.
- what's the intent of the postfix underscore in `noncopyable_`?
{{{#!cpp
namespace noncopyable_ {
}}}
and the typedef?
{{{#!cpp
typedef noncopyable_::noncopyable noncopyable;
}}}
'''labelsequence'''
- (Especially) if we define our own `operator=`, it should be tested
- And, if we really need it, I guess we don't need to include this:
{{{#!cpp
#include <util/nonassignable.h>
}}}
- The restriction of the assignment operator seems quite counter
intuitive and inconvenient. What's the rationale of it? At the
very least this should be documented.
--
Ticket URL: <http://bind10.isc.org/ticket/2144#comment:10>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list