Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
August 26, 2012 [Issue 8591] New: typecons.RefCounted.refCountedPayload should be nothrow | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=8591 Summary: typecons.RefCounted.refCountedPayload should be nothrow Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody@puremagic.com ReportedBy: monarchdodra@gmail.com --- Comment #0 from monarchdodra@gmail.com 2012-08-26 10:51:04 PDT --- When autoInit == RefCountedAutoInitialize.no, then: refCountedPayload() (and "alias refCountedPayload this") should be nothrow. This can be fixed by declaring two different functions in a static if bloc... but this may break the auto doc? Fix is in pull request 736 https://github.com/D-Programming-Language/phobos/pull/736 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 26, 2012 [Issue 8591] typecons.RefCounted.refCountedPayload should be nothrow | ||||
---|---|---|---|---|
| ||||
Posted in reply to monarchdodra@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=8591 Jonathan M Davis <jmdavisProg@gmx.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jmdavisProg@gmx.com --- Comment #1 from Jonathan M Davis <jmdavisProg@gmx.com> 2012-08-26 11:01:30 PDT --- Marking it as nothrow should be completely unnecessary. The function is templated. nothrow should be inferred. And having to duplicate the function to have a nothrow and non-nothrow version is definitely undesirable. However, attribute inferrence seems to be very broken right now ( bug# 8504 ), so it wouldn't surprise me in the least if it's not being inferred properly in this case. Attribute inferrence seems to work _sometimes_, but I have yet to figure out under what conditions it does. It's _supposed_ to be inferred for all templated functions, delegates which are explicitly typed, and lambdas, but it only works in a fraction of those circumstances. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 27, 2012 [Issue 8591] typecons.RefCounted.refCountedPayload should be nothrow | ||||
---|---|---|---|---|
| ||||
Posted in reply to monarchdodra@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=8591 --- Comment #2 from monarchdodra@gmail.com 2012-08-27 06:36:37 PDT --- I didn't know that nothrow could be inferred. Also, I completely agree that duplicating the function is, at best, un-desirable. Yet the inference doesn't wor;: However, I am not calling "refCountedPayload" directly, but the alias "alias refCountedPayload this". Maybe that is the reason? Or not, I just read #8504. Anyways, it is preventing me from marking other functions as unconditionally nothrow. I think that in the long run, it is better to have a single workaround, which can be centrally fixed later, rather than having a bunch of functions work around it, potentially never fixing some of those workaround. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
September 02, 2012 [Issue 8591] typecons.RefCounted.refCountedPayload should be nothrow | ||||
---|---|---|---|---|
| ||||
Posted in reply to monarchdodra@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=8591 --- Comment #3 from github-bugzilla@puremagic.com 2012-09-02 10:29:54 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/46244164099ec139dad4282c167ea02caac2ecda Fixes for issue 8591 (nothrow) https://github.com/D-Programming-Language/phobos/commit/5272df64b29cc5245193c629a5fc15ab0ef2bcf6 Merge pull request #763 from monarchdodra/bug8591 Bug8591 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
September 02, 2012 [Issue 8591] typecons.RefCounted.refCountedPayload should be nothrow | ||||
---|---|---|---|---|
| ||||
Posted in reply to monarchdodra@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=8591 --- Comment #4 from Jonathan M Davis <jmdavisProg@gmx.com> 2012-09-02 15:23:36 PDT --- > I didn't know that nothrow could be inferred. nothrow, pure, and @safe are inferred for templated functions and lambdas: http://dlang.org/function.html#function-attribute-inference -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
September 02, 2012 [Issue 8591] typecons.RefCounted.refCountedPayload should be nothrow | ||||
---|---|---|---|---|
| ||||
Posted in reply to monarchdodra@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=8591 Jonathan M Davis <jmdavisProg@gmx.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation