From 2488a9d52aa326ef1096d29caa95491bb71133f0 Mon Sep 17 00:00:00 2001 From: pravic Date: Thu, 9 Jun 2016 15:01:51 -0700 Subject: [PATCH] Fix typo in docs/Function.md Summary: Closes https://github.com/facebook/folly/pull/421 Reviewed By: yfeldblum Differential Revision: D3413832 Pulled By: elliottneilclark fbshipit-source-id: 7af1462c250c8d6b5d6f5dfcb3f3117dff7877c9 --- folly/docs/Function.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folly/docs/Function.md b/folly/docs/Function.md index a54a6184..3390707c 100644 --- a/folly/docs/Function.md +++ b/folly/docs/Function.md @@ -15,7 +15,7 @@ some_future.then( { foo_ptr->setX(x); } ); ``` -This piece of code did not compile before `folly::Future` started using `folly::Function` insted of `std::function` to store the callback. Because the lambda captures something non-copyable (the `unique_ptr`), it is not copyable itself. And `std::function` can only store copyable callables. +This piece of code did not compile before `folly::Future` started using `folly::Function` instead of `std::function` to store the callback. Because the lambda captures something non-copyable (the `unique_ptr`), it is not copyable itself. And `std::function` can only store copyable callables. The implementation of folly::Future did not make use of the copy-constructibility of `std::function` at any point. There was no benefit from the fact that the `std::function` is copy-constructible, but the fact that it can only wrap copy-constructible callables posed a restriction. -- 2.34.1