-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Pull Request resolved: #2133 There was some feedback about current design: * it would be great for a commit to be explicit. * conditionally extending or starting a new record sometimes useful. ## Alternative * Explicit autocommit on destructor We can continue to do this. The problem is: empty range, at the moment empty range is the same as any other. If you have a commit function then ``` builder = ...; builder.push_back('a'); builder.commit(); ``` should only add "a". I don't think it's a good idea basically. * Move semantics to builder. Like unique_ptr - builder. When goes out of scope - commit happens. Downside: no explicit commit call. A bit "too clever". * Nothing on destructor. Easy to leave a tape in a broken state. Differential Revision: D53311830 fbshipit-source-id: 88d59e95d39e9b42a5c7bfc6eac3650402b930c9
- Loading branch information
1 parent
5a6ba76
commit e5fac9e
Showing
3 changed files
with
118 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters