Bug 19899 – std.bitmanip.bitsSet should accept const arguments
Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-05-24T07:11:10Z
Last change time
2019-05-24T07:58:33Z
Keywords
pull
Assigned to
No Owner
Creator
Nathan S.
Comments
Comment #0 by n8sh.secondary — 2019-05-24T07:11:10Z
The following currently fails to compile:
----
void main()
{
import std.bitmanip : bitsSet;
const rawBits = 123;
auto b = bitsSet(rawBits);
}
----
Comment #1 by dlang-bot — 2019-05-24T07:13:03Z
@n8sh created dlang/phobos pull request #7033 "`const`ify scalar arguments in std.bitmanip to reduce IFTI template bloat" fixing this issue:
- `const`ify scalar arguments in std.bitmanip to reduce IFTI template bloat
Fixes Issue 19899 - std.bitmanip.bitsSet should accept const arguments
This also makes `swapEndian` not propagate `const` to its return value
which is arguably an improvement
(see https://github.com/dlang/phobos/pull/6682#discussion_r213024113).https://github.com/dlang/phobos/pull/7033
Comment #2 by dlang-bot — 2019-05-24T07:58:33Z
dlang/phobos pull request #7033 "`const`ify scalar arguments in std.bitmanip to reduce IFTI template bloat" was merged into master:
- 0c376b40c4bd0b359a6e54c2c63ccb0ff7ee46bc by Nathan Sashihara:
`const`ify scalar arguments in std.bitmanip to reduce IFTI template bloat
Fixes Issue 19899 - std.bitmanip.bitsSet should accept const arguments
This also makes `swapEndian` not propagate `const` to its return value
which is arguably an improvement
(see https://github.com/dlang/phobos/pull/6682#discussion_r213024113).https://github.com/dlang/phobos/pull/7033