-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patharray.cpp
More file actions
47 lines (43 loc) · 1.14 KB
/
Copy patharray.cpp
File metadata and controls
47 lines (43 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright (c) 2024- David Lucius Severus
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
#include "../src/array/arrays.hpp"
#include "../src/io/console.hpp"
#include "../src/std.hpp"
#include "snowball/snowball.hpp"
int
main()
{
mc::carray<float, 2450> fl;
mc::array<int, 20> arr([]() -> int { return 5; });
sb::require(arr[10] == 5);
sb::require(arr.all(5) == true);
// for ( auto &n : arr )
// mc::console(n);
mc::conarray<float, 10> farr(4.4f);
// for ( auto &n : farr )
// mc::console(n);
sb::require(farr.view()[0] == 4.4f);
farr += 10;
sb::require(farr.view()[0] == 14.4f);
sb::require(farr.all(0) == false);
mc::bisect_array<int, 64> barr;
barr.insert(10);
barr.insert(5);
barr.insert(22);
barr.insert(4356);
barr.insert(4);
barr.insert(9);
barr.insert(0);
sb::require(barr[0] == 0);
sb::require(barr[1] == 4);
sb::require(barr[2] == 5);
sb::require(barr[3] == 9);
sb::require(barr[4] == 10);
sb::require(barr[5] == 22);
// for ( auto &n : barr )
// mc::console(n);
return 0;
};