Opened 15 years ago
Closed 15 years ago
#979 closed Bugs (fixed)
::boost::detail::empty_base could be improved
Reported by: | Owned by: | Daniel Frey | |
---|---|---|---|
Milestone: | Boost 1.34.1 | Component: | operators |
Version: | Boost 1.34.0 | Severity: | Optimization |
Keywords: | operator library | Cc: | dave@…, witt@…, d.frey@… |
Description
The empty base class used by the operators library will not actually be empty if you have a class inheriting from operators and the first member also inherits from operators - the work around is to have an empty_base<T> to ensure a unique type - so you end up with:
class my_class : equality_comparable<my_class, my_class, empty_base<my_class> > { ...
Kind of gross - such a base could be included directly in the operator library.
Sean
Attachments (1)
Change History (16)
comment:1 by , 15 years ago
Milestone: | Boost 1.34.1 → Boost 1.35.0 |
---|---|
Owner: | set to |
Status: | new → assigned |
comment:2 by , 15 years ago
Component: | iterator → operators |
---|---|
Severity: | Problem → Optimization |
comment:4 by , 15 years ago
Milestone: | Boost 1.35.0 → Boost 1.34.1 |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Reopened for inclusion in 1.34.1
follow-up: 7 comment:5 by , 15 years ago
I can't see how this is appropriate for 1.34.1
It's NAD, in my opinion, and should be put off until the next full release.
comment:6 by , 15 years ago
Although I have a work around so putting off until 1.35.0 is fine with me - the work around is ugly and I do consider a helper template that adds unnecessary words to my objects a defect.
follow-up: 8 comment:7 by , 15 years ago
Replying to dave:
I can't see how this is appropriate for 1.34.1
It's a "simple" change, passes testing on HEAD and it won't delay 1.34.1 even if we have to back it out again.
It's NAD, in my opinion, and should be put off until the next full release.
If this were a commercial project I would agree. My experience is that a more opportunistic approach is required for boost. There is no way prioritizing changes when you can not prioritize work items.
follow-up: 9 comment:8 by , 15 years ago
Replying to witt:
Replying to dave:
I can't see how this is appropriate for 1.34.1
It's a "simple" change, passes testing on HEAD and it won't delay 1.34.1 even if we have to back it out again.
Unless the change is not exactly as proposed in the summary of this ticket, it is a breaking change for users. I can't imagine any good excuse for doing that in a point release, and I object strongly to doing so.
by , 15 years ago
Attachment: | operators.hpp.diff added |
---|
comment:9 by , 15 years ago
Replying to dave:
Replying to witt:
Replying to dave:
I can't see how this is appropriate for 1.34.1
It's a "simple" change, passes testing on HEAD and it won't delay 1.34.1 even if we have to back it out again.
Unless the change is not exactly as proposed in the summary of this ticket, it is a breaking change for users. I can't imagine any good excuse for doing that in a point release, and I object strongly to doing so.
Dave, I have attached the proposed patch. This may very well be my fault. I never intended to add a breaking change. Looking at the patch I still can't figure it out. What am I missing?
comment:10 by , 15 years ago
Cc: | added |
---|
follow-up: 12 comment:11 by , 15 years ago
Sorry, the mistake is mine. I didn't realize, from the example, which used no qualification and showed empty_base
named in what is presumably user code, that empty_base
was in boost::detail
. As long as users aren't touching empty_base
the patch is OK.
follow-up: 13 comment:12 by , 15 years ago
Replying to dave:
I always assumed everything in boost::detail
is fair game. Should we be more conservative?
follow-up: 14 comment:13 by , 15 years ago
Replying to witt:
Replying to dave:
I always assumed everything in
boost::detail
is fair game.
Well, it should be... but occasionally you see stuff like this:
http://www.boost.org/libs/serialization/doc/archive_reference.html http://www.boost.org/libs/serialization/doc/derivation.html
Should we be more conservative?
I don't think so. Did http://svn.boost.org/trac/boost/ticket/979#comment:11 lead you to think I would say otherwise.
comment:14 by , 15 years ago
Replying to anonymous:
Replying to witt:
Replying to dave:
I always assumed everything in
boost::detail
is fair game.Well, it should be... but occasionally you see stuff like this:
http://www.boost.org/libs/serialization/doc/archive_reference.html http://www.boost.org/libs/serialization/doc/derivation.html
Sigh!
Should we be more conservative?
I don't think so. Did http://svn.boost.org/trac/boost/ticket/979#comment:11 lead you to think I would say otherwise.
No, not really. I am just paranoid about misunderstandings with release issues ;-).
comment:15 by , 15 years ago
Cc: | added |
---|---|
Resolution: | → fixed |
Status: | reopened → closed |
Applied patch to RC_1_34_0. Sorry Dave, I should have added the patch to the ticket from the very beginning.
Accepted, but raised milestone to 1.35.0 as the risk of breaking other compilers is not worth it. Once regression tests show that everything is fine, I might consider moving it back to 1.34.1, but it should not delay 1.34.1.