TemporaryFile and TemporaryDirectory
authorAdam Simpkins <simpkins@fb.com>
Thu, 26 Mar 2015 19:40:56 +0000 (12:40 -0700)
committerafrind <afrind@fb.com>
Thu, 2 Apr 2015 18:57:52 +0000 (11:57 -0700)
commitbf0d21438a2bccef4d851f12bd90e6cb371be22f
tree439770e8e8da435add2987742b186f06072359a0
parent3e447ce40b23c86a6bca8cbaa91e32530962486b
TemporaryFile and TemporaryDirectory

Summary:
TemporaryFile, TemporaryDirectory, and ChangeToTempDir should all be moveable
objects, but not copiable.  Define default move constructors and move
assignment operators for these classes.  This will prevent copy constructor and
copy assignment operators from being implicitly defined.

Test Plan:
Used this in a new test to write a helper function which created and returned
a new TemporaryFile object using the move constructor.

Reviewed By: yfeldblum@fb.com

Subscribers: doug, net-systems@, exa, folly-diffs@, yfeldblum

FB internal diff: D1945134

Signature: t1:1945134:1427342944:3428327e797ce4b3d362f9a2d2276de6d8b96137
folly/experimental/TestUtil.h