Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Language

C++

Compiler

clang HEAD 18.0.0git (https://github.com/llvm/llvm-project.git 90c397fc56b7a04dd53cdad8103de1ead9686104)

Options
Don't Use Boost
C++2b(GNU)
no pedantic

$ clang++ prog.cc -std=gnu++2b
threadid: 140313208350464 enter initbalance()
balance of sam is 1000
balance of rob is 100
balance of steve is 200
threadid: 140313208350464 exit initbalance()

threadid: 140313208350464 enter transfer_funds()
account sam and account steve are waiting for assignment

account sam and account steve are assigned
balance of account sam is  900
balance of account steve is  300
threadid: 140313216743168 enter transfer_funds()
account sam and account rob are waiting for assignment
account sam is free and account steve is free
threadid: 140313208350464 exit transfer_funds()

account sam and account rob are assigned
balance of account sam is  800
balance of account rob is  200
account sam is free and account rob is free
threadid: 140313216743168 exit transfer_funds()
Exit Code:
0