[PATCH] D42234: [ADT] Add PropagateConst from LFTS2

Jonathan B Coe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 02:32:25 PST 2018


jbcoe created this revision.
jbcoe added reviewers: mclow.lists, aaron.ballman.
Herald added subscribers: llvm-commits, mgorny.

PropagateConst wraps a pointer-type and allows only const access to the pointee when the pointer is accessed through a const-access path. PropagateConst is useful when writing const-correct component-based classes.

PropagateConst is part of Library Fundamentals Technical Specification 2 and has been implemented in libcxx and libstdcxx. The implementation in this patch is based on my implementation from libcxx.


Repository:
  rL LLVM

https://reviews.llvm.org/D42234

Files:
  llvm/include/llvm/ADT/PropagateConst.h
  llvm/unittests/ADT/CMakeLists.txt
  llvm/unittests/ADT/PropagateConstTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42234.130374.patch
Type: text/x-patch
Size: 10291 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180118/610a9a0c/attachment.bin>


More information about the llvm-commits mailing list