[PATCH] D48807: Add llvm::Any
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 30 15:43:00 PDT 2018
zturner created this revision.
zturner added reviewers: chandlerc, dblaikie, timshen.
Herald added subscribers: dexonsmith, mgorny.
This is a replacement for `std::any` until such time that we have C++17. While I generally agree it should not be used, and usually you want something like a variant, there are still occasions where it can be useful. One example is where a user wants to attach some user data to a structure that passes through library code and comes back around through a callback or similar mechanism. Another is when porting old-style C code that uses `void*`. I'm sure we can come up with plenty of other uses as well.
https://reviews.llvm.org/D48807
Files:
llvm/include/llvm/ADT/Any.h
llvm/unittests/ADT/AnyTest.cpp
llvm/unittests/ADT/CMakeLists.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48807.153639.patch
Type: text/x-patch
Size: 9993 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180630/fbda7108/attachment.bin>
More information about the llvm-commits
mailing list