BIND 10 #2144: add nonassignable super class
BIND 10 Development
do-not-reply at isc.org
Fri Mar 22 12:08:39 UTC 2013
#2144: add nonassignable super class
-------------------------------------+-------------------------------------
Reporter: fdupont | Owner:
Type: enhancement | fdupont
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 fdupont):
Replying to [comment:10 jinmei]:
> '''nonassignable.h and noncopyable.h'''
>
> - First off: do we need our own noncopyable, if it's just a copy of
> Boost?
=> a copy
> - Please add documentation: brief description of what it is, the
> purpose of these classes, in which case we should use which, and
> why, etc.
=> do we need more than Boost doc? BTW as far as I can understand of
Visual Studio explanations the use is for classes with const members:
The compiler will also generate an assignment operator function for a
class that does not define one. This assignment operator is a memberwise
copy of the data members of an object. Because const data items cannot be
modified after initialization, if the class contains a const item, the
default assignment operator would not work. Another cause of the C4512
warning is a declaration of a nonstatic data member of reference type.
> - Shouldn't we also copy Boost copyright?
> {{{#!cpp
> /// From boost/noncopyable.hpp
> }}}
> even though the definition is quite trivial.
=> I don't know the exact policy but IMHO we should.
> - what's the intent of the postfix underscore in `noncopyable_`?
> {{{#!cpp
> namespace noncopyable_ {
> }}}
> and the typedef?
> {{{#!cpp
> typedef noncopyable_::noncopyable noncopyable;
> }}}
=> it is from Boost so ask a Boost person...
> '''labelsequence'''
>
> - 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.
=> note I agree with Microsoft assignment operator and const members
are not really compatible...
--
Ticket URL: <http://bind10.isc.org/ticket/2144#comment:12>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list