[Issue 13806] New: std.bitmanip.BitArray -- use of methods named init() messes up templates

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Dec 1 13:06:05 PST 2014


https://issues.dlang.org/show_bug.cgi?id=13806

          Issue ID: 13806
           Summary: std.bitmanip.BitArray -- use of methods named init()
                    messes up templates
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Phobos
          Assignee: nobody at puremagic.com
          Reporter: erikas.aubade at gmail.com

It seems to be pretty common and accepted practice to use the static init field
to get default values of an arbitrary templated type--however this pattern will
fail hard on types like BitArray that have methods name init(), and no
overloads that can be called without parameters.

It'd make life a lot easier if these methods could be renamed to something like
initialize().

--


More information about the Digitalmars-d-bugs mailing list