Homebrew C++ Threading and Exceptions

TheToaster

Kishore
OP
Member
Joined
Aug 11, 2015
Messages
467
Trophies
0
Location
USA
XP
979
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.
 

TheCruel

Developer
Banned
Joined
Dec 6, 2013
Messages
1,350
Trophies
2
XP
3,131
Country
United States
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.
 

TheToaster

Kishore
OP
Member
Joined
Aug 11, 2015
Messages
467
Trophies
0
Location
USA
XP
979
Country
United States
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,

TheCruel

Developer
Banned
Joined
Dec 6, 2013
Messages
1,350
Trophies
2
XP
3,131
Country
United States
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

General chit-chat
Help Users
  • No one is chatting at the moment.
    The Real Jdbye @ The Real Jdbye: never had one before that, and never had one since