News for hackers. Stuff that matters.
Re:Folly: An open-source C++ library developed and used at F... by guavaNinja on Friday January 07, 2022 @01:53PM (#29843124)
This[1] is a c-flavoured c++ STL replacement, uses minimal number of c++ features to be easy to use yet simple. We built it and use it internally where I work.

It's not c but almost c, it could be useful for you

[1] https://github.com/MoustaphaSaad/mn/blob/master/mn/include/m...

Re:Folly: An open-source C++ library developed and used at F... by synergy20 on Friday January 07, 2022 @06:34PM (#29846494)
This is still all in c++ correct? why not just using STL instead, am I missing something here.

There are a few pure-C made STL alike containers for C that uses no c++ code at all, a random github search finds this: https://github.com/assyrianic/Harbol , there are quite a few of them just not recalling them now.

Re:Folly: An open-source C++ library developed and used at F... by alcover on Friday January 07, 2022 @02:21PM (#29843507)
Thank you. You don't seem to provide a c_str() equivalent (a method that gives a pointer to or copies out a C-string) or views ? Sorry if I missed them.
Re:Folly: An open-source C++ library developed and used at F... by guavaNinja on Friday January 07, 2022 @03:18PM (#29844197)
We hate getters/setters. There is `using Str = Buf<char>` if you looked into Buf you will find ptr and count and cap. You are looking for ptr