Homebrew C++ Threading and Exceptions

  • Thread starter Thread starter TheToaster
  • Start date Start date
  • Views Views 1,261
  • Replies Replies 3

TheToaster

Kishore
Member
Joined
Aug 11, 2015
Messages
467
Solutions
1
Reaction score
174
Trophies
0
Location
USA
XP
1,000
Country
United States
Hello.

Is it possible to use the standard C++ multithreading library (such as std::thread and atomic operations) in developing Homebrew? Or can I only use the threading provided by DevKitPro?

Also, I don't think C++ exceptions work. But can I use the containers, algorithms, and operations from the standard library? I don't know if these would work because they use C++ exceptions internally for error handling.
 
STL containers (and most things) work without exceptions. I use them all the time. You can even use exceptions and RTTI, I've used them a little, just make sure you're not compiling with -fno-exceptions flag (or without -rno-rtti if you want that) which is the devkitarm default.
 
STL containers (and most things) work without exceptions. I use them all the time. You can even use exceptions and RTTI, I've used them a little, just make sure you're not compiling with -fno-exceptions flag (or without -rno-rtti if you want that) which is the devkitarm default.
But won't RTTI and Exceptions cause overhead? Or will it not?

And also is multithreading library supported for Homebrew?
 
Last edited by TheToaster,
But won't RTTI and Exceptions cause overhead? Or will it not?
Yeah a bit, and increase filesize, I wouldn't use them if you don't need them. But STL containers, io streams, and algorithm/functional stuff works. I'm pretty sure standard threading or atomic operations don't work, as least not as expected, but I haven't tried, ctrulib has simple threading functions.
 

Site & Scene News

Popular threads in this forum