[Issue 4417] const-violation in struct error message

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jan 20 13:08:32 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=4417


Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich at gmail.com
          Component|DMD                         |Phobos
           Platform|x86                         |All
         OS/Version|Windows                     |All
           Severity|enhancement                 |normal


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-01-20 13:08:30 PST ---
I think this is an issue with Phobos, not the compiler.

The error is now slightly better (first two shown):

Error: mutable method std.random.LinearCongruentialEngine!(uint, 48271, 0,
2147483647).LinearCongruentialEngine.front is not callable using a const object
Error: mutable method std.random.LinearCongruentialEngine!(uint, 48271, 0,
2147483647).LinearCongruentialEngine.popFront is not callable using a const
object

uniform() should probably reject a const random number generator. And this is
probably true for all range-taking functions. If you can't call popFront then
you can't do much with the range AFAICT. Not even .save helps in this case.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list