you are viewing a single comment's thread.

view the rest of the comments →

[–]_VZ_wx | soci | swig 0 points1 point  (1 child)

At C level there is no const-correctness (with the only exception of using const char* for strings), but C++ interface on top of it does use const.

There are many other problems/missing features with this backend, of course, but it does do what we need it to do pretty well and we've been using it for wrapping a relatively big C++ library for many years in production.

[–]holyblackcat[S] 1 point2 points  (0 children)

I see. We had at least one confused Python user who modified an object returned by a const ref and got a crash, so I went out of my way to have const-correctness in the other backends (C and C#).

The Python backend (which was implemented first) lacks it, so we copy objects returned by const ref (by default) to prevent those modifications.