http://llvm.org/bugs/show_bug.cgi?id=16770
Bug ID: 16770
Summary: [RFE] add constexpr to some bitset functions
Product: libc++
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Created attachment 10972
--> http://llvm.org/bugs/attachment.cgi?id=10972&action=edit
diff against my bitset header with constexpr additions
I would like constexpr versions of the following functions in std::bitset:
to_ulong, to_ullong
I wrote a patch.
Because it looked easy, I also converted all(), any(), none() and test() to
constexpr.
There are overloads for all(), any() and to_ullong to write the loops via
recursive function-calls. An additional overload for any() is used in the
exception-version of to_ul(l)ong.
I'm certain a couple of more could be converted to constexpr, like flip() and
the operators == and != (the latter two might even be useful as constexpr), but
I am currently not interested in those.
I am unable to execute the tests: I'm getting a Python exception about not
being able to find the __main__ module. As such, I only did a very rudimentary
test of the patch.
Further more, I might have violated (probably did) coding conventions and I
probably broke ABI compatibility (I have no experience with that).
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs