[LLVMbugs] [Bug 16770] New: [RFE] add constexpr to some bitset functions
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Aug 1 17:51:40 PDT 2013
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: hhinnant at apple.com
Reporter: 1zeeky at gmail.com
CC: llvmbugs at cs.uiuc.edu
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130802/271835b3/attachment.html>
More information about the llvm-bugs
mailing list