root42, to Java
@root42@chaos.social avatar

I was missing Java‘s lastIndexOf function in C++ the other day. So here is my interpretation of it:

https://gist.github.com/root42/4b2885d45c82b34462327bc911183a60

There are probably better variants, so feel free to improve on it!

root42, to random
@root42@chaos.social avatar

Why the heck did C++ deprecate codecvt? And why the heck will it remove it and all utf conversion functions in C++26?

root42, to random
@root42@chaos.social avatar

To all the C++ experts out there: Is there a compelling reason why std::basic_fstream doesn’t allow for:
a. A custom allocator
b. A custom buffer during construction?
I can call rdbuf()->pubsetbuf() after construction, however I think I don’t have a guarantee that a buffer hasn’t already been allocated.
This is annoying if you are using your own heap implementation. Any good hints on how to solve this?

ctaylor, (edited ) to cpp
@ctaylor@mastodon.content.town avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • provamag3
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • JUstTest
  • All magazines