Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Language

C++

Compiler

clang HEAD 8.0.0 (https://github.com/llvm-mirror/clang.git 44951dc4dbb129fc49bf58f3e0a085725d36c29f) (https://github.com/llvm-mirror/llvm.git d1c472605b0ff640ff202a7faee1fc3dad0174b6)

Options
Don't Use Boost
C++17
no pedantic

$ clang++ prog.cc -std=c++17

map.insert(0, 10, "foo")
{0, foo}
{10, {}}

map.at(0) = foo
map[10].has_value() = false


map.insert(3, 7, "bar")
{0, foo}
{3, bar}
{7, foo}
{10, {}}

map.at(5) = bar


map.remove(2, 8)
{0, foo}
{3, bar}
{7, foo}
{10, {}}

map[5].has_value() = true
Exit Code:
0