Fix folly::Partial copy/move construction
authorSven Over <over@fb.com>
Sun, 2 Oct 2016 17:22:13 +0000 (10:22 -0700)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Sun, 2 Oct 2016 17:23:29 +0000 (10:23 -0700)
commit806a09e4bc1624dadee3622e9acbd4b3fa5cf5af
treecabd88d62f49aa13e6ebb3368f2828f2f74daeb0
parenteb6bd53fde2fd971d891c06fa81f8d0e385a79a1
Fix folly::Partial copy/move construction

Summary:
Any attempt to copy or move an object returned by folly::partial
yields a compiler error because it is invoking the constructor
for wrapping callable objects, which triggers a type mismatch.

This diff fixes that by explicitly naming the default implementations
of copy and move constructors.

This diff also adds additional tests that fail to compile without this fix.

And then this diff also moves the Partial class into folly::detail,
because it is not meant to be named in user code, but only returned
by the folly::partial function.

Reviewed By: mhx

Differential Revision: D3923809

fbshipit-source-id: a8883951afd2a1999acbfffc51296393b058f860
folly/Partial.h
folly/test/PartialTest.cpp