devosoft / Empirical

A library of tools for scientific software development, with emphasis on also being able to build web interfaces using Emscripten.
Other
86 stars 38 forks source link

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

Open rodsan0 opened 3 years ago

rodsan0 commented 3 years ago

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):

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