cdmh
Boost 1.61 C++ library released
Symmetric Stability of Low Level Feature Detectors (Computer Vision) [pdf]
Boost version 1.59 C++ libraries is released
Social networks and consumer Internet products: unsustainable in the current form?
Re:Boost 1.55.0 beta 1 release candidates available for testing
on Thursday October 03, 2013 @01:58PM (#6490683)
Documentation is at http://www.boost.org/users/history/version_1_55_0.html
Boost 1.55.0 beta 1 release candidates available for testing
Sorting Algorithms implemented in C++
Lest, a tiny C++11 unit test helper
Re:A C++ Immutable String class
on Saturday September 21, 2013 @03:35PM (#6424149)
21.4.1 p6 states invalidation of iterators/references is only allowed for
— as an argument to any standard library function taking a reference to non-const basic_string as an argument.
— Calling non-const member functions, except operator[], at, front, back, begin, rbegin, end, and rend.
The non-const operator[] in a COW string requires making a copy of the string if the ref count > 1 which invalidates references and violates this paragraph.
Re:A C++ Immutable String class
on Saturday September 21, 2013 @02:05PM (#6423828)
The class is movable already. Reference counting will allow a copy constructor or copy assignment to avoid copying the string object, just increase the reference count.
Re:A C++ Immutable String class
on Saturday September 21, 2013 @01:46PM (#6423766)
COW is prohibited in C++11 Standard implementations of std::basic_string
Re:A C++ Immutable String class
on Saturday September 21, 2013 @12:52PM (#6423534)
That is accurate. The object reference by immutable msg is hello_world which is mutable. If the value of hello_world changes, then the value of msg changes too. In the simple example, it won't happen, but the point is that it could, especially when multi-threaded.
Re:A C++ Immutable String class
on Saturday September 21, 2013 @12:37PM (#6423477)
Hi Alex, you say I "claim[s] that objects accessed via reference to const can modify themselves". Which paragraph are you referring to? It don't see that? I'm happy to update the article to make it clearer. Thanks, Craig
Re:A C++ Immutable String class
on Saturday September 21, 2013 @12:16PM (#6423405)
I'm toying with implementing O(1) copies by using a reference counted pointer to basic_string instead of storing it by value within the class. It would mean a small memory overhead and another level of indirection, but probably worth doing. Thoughts?
Re:A C++ Immutable String class
on Saturday September 21, 2013 @12:05PM (#6423359)
I had a problem with the traffic volumes! It's back now, and stable.
I don't mention Java ;)
A C++ Immutable String class
One app for each gadget? No way This is not the Internet of Things we want
Using C++ template parameters to create strong types
Using strong types to avoid common C++ programming errors
Software defect analysis and traceability
MapReduce C++ Library for single-machine, multicore applications
Update to "C++11 breaking changes in const-correctness guarantees"
Avoiding problems with matching signed and unsigned types in C++
Re:C++11 breaking changes in const-correctness guarantees
on Thursday May 30, 2013 @06:52AM (#5791761)
I've updated the text to emphasize that. Thanks for pointing it out