Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Language

C++

Compiler

gcc 4.9.4

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

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.75.0-gcc-4.9.4/include -std=gnu++11
auto sp1 = allocate_shared<C>(alloc, 1)
sp1		= C{ i:1, f:0 }

shared_ptr<C> sp2 = allocate_shared<C>(alloc, 2, 3.0f)
sp2		= C{ i:2, f:3 }

auto sp3 = allocate_shared<int>(alloc,20)
*sp3		= 20

auto sp4 = allocate_shared<vector<int>>(alloc,30)
sp4->size()	 = 30

Exit Code:
0