ctaylor, (edited ) to cpp
@ctaylor@mastodon.content.town avatar
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 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

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?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • anitta
  • rosin
  • InstantRegret
  • ethstaker
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • thenastyranch
  • Youngstown
  • GTA5RPClips
  • slotface
  • Durango
  • khanakhh
  • kavyap
  • megavids
  • everett
  • vwfavf
  • Leos
  • osvaldo12
  • cisconetworking
  • cubers
  • modclub
  • ngwrru68w68
  • tacticalgear
  • provamag3
  • normalnudes
  • tester
  • JUstTest
  • All magazines