Skip to content

samirose/CPlusOne

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CPlusOne implements an C++11 immutable wrapper for data structures with support
for partial update. The implementation is in the file CPlusOne/immutable.h.

A structure S wrapped with Immutable<S> is immutable. It supports member access
using the -> operator and implements an implicit conversion back to S.

The structure can be partially updated by calling set member function to it.
Calls to set can be chained and the result can be assigned to a new
Immutable<S> which will be a copy of the original with the fields set was
called for updated with new values. The implementation is optimized to create
only a single copy of the structure per setter chain.

See CPlusOne/main.cpp for a test and usage example.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages