Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Language

C++

Compiler

gcc 12.3.0

Options
Warnings
Boost 1.81.0
C++11(GNU)
no pedantic

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.81.0-gcc-12.3.0/include -std=gnu++11
Before assignment
use_count 	= 0
expired() 	= true

After assignment
use_count 	= 1
expired() 	= false

After lock
*sp 		= 20
use_count 	= 2
expired() 	= false

After reset
use_count 	= 0
expired() 	= true

owner_before() demo
*x			= 20
*w2.lock()		= 10
x < y			= true
w2.owner_before(x)	= false
Exit Code:
0