Move constructors should be noexcept
authorNicholas Ormrod <njormrod@fb.com>
Thu, 30 Oct 2014 17:18:27 +0000 (10:18 -0700)
committerPavlo Kushnir <pavlo@fb.com>
Sat, 8 Nov 2014 02:09:45 +0000 (18:09 -0800)
commit75c6adfae4a1842511e8b62150cc18ffb391efa7
tree0ed76a7113c40134f30924643c446eb89e2b11a6
parent449e25960a2c635eea8fe2be9a8f090dccdfcb7e
Move constructors should be noexcept

Summary:
The compiler is able to make some nice optimizations when it
knows that move constructors are noexcept. (In particular, it helps a
lot inside of std::vector if you don't need to worry about the
possibility of exception during reallocation.) Some move constructors in
folly are obviously moveable: change them.

Test Plan: unit tests

Reviewed By: delong.j@fb.com

Subscribers: trunkagent, sdwilsh, njormrod, folly-diffs@

FB internal diff: D1644296

Tasks: 5486739

Signature: t1:1644296:1414618605:d9a0db5193c82650b96e9c62b019d5da218b15c5
12 files changed:
folly/Benchmark.h
folly/File.cpp
folly/File.h
folly/MemoryMapping.cpp
folly/MemoryMapping.h
folly/ScopeGuard.h
folly/ThreadLocal.h
folly/io/IOBufQueue.cpp
folly/io/IOBufQueue.h
folly/test/ApplyTupleTest.cpp
folly/test/LazyTest.cpp
folly/test/small_vector_test.cpp