Skip to content

Can't brace-initialize a BitSet with a std::string #459

Description

@rodsan0

Describe the bug
Brace-initializing a BitSet with a string results in a BitSet initialized to 1. This is because the initializer_list<T> ctor is preferred over the const std::string& one. The former ctor's type should be changed to initializer_list<bool> instead. Moreover, line 412 should ideally be commented out.

To Reproduce
Brace-initialize a BitSet with a std::string.

Expected behavior
BitSet contains a bit-for-bit representation of the contents of the "binary" std::string.

Toolchain (please complete the following information):

  • OS: Arch Linux
  • Compiler: Clang 13.0.0
  • Empirical Version: native-canvas branch

Additional context
This bug is only present in the native-canvas branch.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions