Question: Trying to write vba code to add and delete repeating item section for specifically named RSCC.

The following code works for adding but cannot figure out how to delete

[Is it possible to add Repeating Section Content Control section with VBA?](https://stackoverflow.com/questions/53883276/is-it-possible-to-add-repeating-section-content-control-section-with-vba)

Answer: 
This is Undefined Behavior.

From [dcl.type.cv],

> 
> Any attempt to modify a const object during its lifetime results in
> undefined behavior.
> 
> 
> 

Adding the `mutable` specifier to `buffer` will allow it to be modified by a `const` member function.
No. It won't be undefined behaviour from practice, forget about what "standard" describes. It will behave just like without the "const".

The reason is that the "const" qualifier for an object in C++ is merely to tell the compiler to generate a compilation error in the case where some members or functions inside the object get invoked. Besides that, adding a "const" qualifier to an object doesn't results in different binaries after compilation.

This is different from the "const" qualifier applied on primitive types, such as "const int", "const char \*". A variable of type "const int" will probably replaced by its compile-time value for optimization purpose. A string literal of type "const char \*" will refer to some memory page that has read access limitation by the OS in such a way that modifying the memory content will let to crash of the program.

Also, a "const" qualifier of a function does result in different function signatures and can be treated like a function overloading.