TGViewer
C++ - Reddit C++ - Reddit @r_cpp · 230 subscribers
Post #25330 12
C++26 reflections for sqlite3

Have you ever wanted to cut down on the sqlite boilerplate in your code? Yeah, me too. Not sure this will help much.
Bu-but! It is a functioning demo of reflections in C++ being used for the greater good.

https://codeberg.org/karurochori/reflite

(or https://github.com/KaruroChori/reflite, although I decided to slowly migrate over the other platform)

I am working on a lua playground for a different project of mine, and this ended up being self contained and useful enough to share. Don't expect high quality magic in there, I am still trying to figure out reflections as there is not much material online, and it mostly revolves around pre-standard versions which are now incompatible. So, any feedback is very much welcome.

Basically, it ties together plain data types with some of the most common types of statements, to cut a considerable amount of boilerplate when handling types in the returning records and within the queries themselves. Plus the typical "lifetime of objects" goodies C++ brings.
It is not and does not want to be an ORM.

Demo online, https://godbolt.org/z/YzdKsWvM3 , the library seems to be working fine on g++ 16.1 and on this special branch of clang++ too.

By the way, does anyone know where to find its source? I would reeeally prefer to compile a local version with reflections enabled, as I need offloading support as well.

https://redd.it/1tt2z73
@r_cpp
Codeberg.org reflite C++26 reflection wrapper for SQLITE
More from @r_cpp
  1. Sep 29, 2026Boost.Graph 1.95 will be C++17 Dear Boost.Graph community, In two release cycles (Boost re…
  2. Sep 26, 2026Token Sequence Injection & Modern Macros: The Most Game-Changing Compile-Time Feature in C…
  3. Sep 25, 2026myStringStream.str("") Considered Harmful Under C++20 I was recently looking at some (rath…
  4. Sep 20, 2026A clever branch free optimization I'm the developer of memlz which is an extremely fast co…
  5. Sep 15, 2026Inside Boost.PolyCollection https://bannalia.blogspot.com/2026/09/inside-boostpolycollecti…
  6. Sep 11, 2026C++26: Standard Library Hardening Experiments https://www.cppstories.com/2026/hardening-ex…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →