-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
13 lines (10 loc) · 712 Bytes
/
README
File metadata and controls
13 lines (10 loc) · 712 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
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.