Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make stream local copy optimization as trait option per stream type #32

Merged
merged 3 commits into from
Jun 29, 2014

Conversation

miloyip
Copy link
Collaborator

@miloyip miloyip commented Jun 29, 2014

By Adding StreamTraits, stream types can specify whether to turn on local copy optimization.
Added unit test to verify that a Stream without copy constructor do not use this optimization by default. Turning it on will generate compilation error.

Fixes #30

‘>>’ should be ‘> >’ within a nested template argument list
need ‘typename’ before
‘rapidjson::StreamTraits<InputStream>::StreamCopyType
miloyip added a commit that referenced this pull request Jun 29, 2014
Make stream local copy optimization as trait option per stream type
@miloyip miloyip merged commit d8ed609 into master Jun 29, 2014
@miloyip miloyip deleted the issue30streamcopy branch June 30, 2014 01:30
miloyip added a commit that referenced this pull request Jul 2, 2014
The previous optimization #32 has problem that restoration requires
assignment operator.
Change the backup/restore process using a template wrapper class to
select code path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strange stream object copying while parsing
1 participant