[PATCH] D22796: [ADT] Add make_scope_exit().

Tim Shen via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 10 11:17:56 PDT 2016


timshen marked an inline comment as done.

================
Comment at: include/llvm/ADT/ScopeExit.h:33-34
@@ +32,4 @@
+
+  scope_exit(const scope_exit &) = default;
+  scope_exit(scope_exit &&) = default;
+
----------------
dblaikie wrote:
> These won't work in the MSVC versions we need to support (they don't support synthesizing move ops at all) - so you'll have to write them out.
> 
> Also, should this type be copyable? I guess if the functor is copyable?
> 
> I'd probably just make it move-only for now & you'll have to write out the move ctor explicitly.
Done. Made it move-only in r278259.


Repository:
  rL LLVM

https://reviews.llvm.org/D22796





More information about the llvm-commits mailing list