Construct TestObject in AtomicLinkedListTest via a const reference
authorChristopher Dykes <cdykes@fb.com>
Thu, 11 Aug 2016 22:38:49 +0000 (15:38 -0700)
committerFacebook Github Bot 3 <facebook-github-bot-3-bot@fb.com>
Thu, 11 Aug 2016 22:53:39 +0000 (15:53 -0700)
commit591b9f3e6893af3afd567516fecf6ca015aaedff
tree01016852c7eabd67f4e08655696d841868a6c1c1
parentca86990b30285336063a3785550675484deaef1a
Construct TestObject in AtomicLinkedListTest via a const reference

Summary:
MSVC doesn't currently guarantee left-to-right argument evaluation order for values constructed via braced initializers, and produces a warning if you try to pass an argument with a non-trivial copy constructor by-value in a constructor used by the braced initializer.
This prevents the warning by simply accepting a const reference instead.

Reviewed By: yfeldblum

Differential Revision: D3705073

fbshipit-source-id: 917ec1bb776d6ec4bfefe50907d4c5ac2f2379b1
folly/test/AtomicLinkedListTest.cpp