contract/example/cline90/vector_main.cpp
2017-12-10 16:31:15 -08:00

24 lines
525 B
C++

// Copyright (C) 2008-2018 Lorenzo Caminiti
// Distributed under the Boost Software License, Version 1.0 (see accompanying
// file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
// See: http://www.boost.org/doc/libs/release/libs/contract/doc/html/index.html
//[cline90_vector_main
#include "vector.hpp"
#include <cassert>
int main() {
vector<int> v (3);
assert(v.size() == 3);
v[0] = 123;
v.resize(2);
assert(v[0] == 123);
assert(v.size() == 2);
return 0;
}
//]