1//
2// immer: immutable data structures for C++
3// Copyright (C) 2016, 2017, 2018 Juan Pedro Bolivar Puente
4//
5// This software is distributed under the Boost Software License, Version 1.0.
6// See accompanying file LICENSE or copy at http://boost.org/LICENSE_1_0.txt
7//
8
9// include:intro/start
10#include <immer/set.hpp>
11int main()
12{
13 const auto v0 = immer::set<int>{};
14 const auto v1 = v0.insert(42);
15 assert(v0.count(42) == 0);
16 assert(v1.count(42) == 1);
17
18 const auto v2 = v1.erase(42);
19 assert(v1.count(42) == 1);
20 assert(v2.count(42) == 0);
21}
22// include:intro/end
23