Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rodsan0 opened this issue Nov 16, 2021 · 0 comments
Open

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

rodsan0 opened this issue Nov 16, 2021 · 0 comments

Comments

@rodsan0
Copy link
Member

rodsan0 commented Nov 16, 2021

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.

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

No branches or pull requests

1 participant