Implementing basic physics
This commit is contained in:
@@ -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>,
|
||||
|
||||
Reference in New Issue
Block a user