Implementing basic physics

This commit is contained in:
Dynamitos
2022-11-29 16:34:42 +01:00
parent 3d3e264867
commit 1e04da963d
39 changed files with 1999 additions and 145 deletions
+1 -24
View File
@@ -1,32 +1,9 @@
#pragma once
#include <utility>
#include "Array.h"
#include "Pair.h"
namespace Seele
{
template <typename K, typename V>
struct Pair
{
public:
Pair()
: key(K()), value(V())
{}
Pair(const Pair& other) = default;
Pair(Pair&& other) = default;
~Pair(){}
Pair& operator=(const Pair& other) = default;
Pair& operator=(Pair&& other) = default;
template<class KeyType>
explicit Pair(KeyType&& key)
: key(std::forward<KeyType>(key)), value(V())
{}
template<class KeyType, class ValueType>
explicit Pair(KeyType&& key, ValueType&& value)
: key(std::forward<KeyType>(key)), value(std::forward<ValueType>(value))
{}
K key;
V value;
};
template <typename K,
typename V,
typename Compare = std::less<K>,