Initial commit

This commit is contained in:
M. George Hansen 2025-06-07 14:17:56 -06:00
commit 91d54c58d5
Signed by: mgeorgehansen
SSH key fingerprint: SHA256:JlIGiQLPyQ2RHTH3a2oVlb20Xkh9Glr8DUF4YTXHJxM
42 changed files with 2212 additions and 0 deletions

33
src/foundation/tuple.cppm Normal file
View file

@ -0,0 +1,33 @@
export module bedrock.foundation:tuple;
import bedrock.numbers;
namespace br {
export template <typename... Types>
class Tuple;
export template <typename T1, typename T2>
class Tuple<T1, T2> {
public:
Tuple(T1 t1, T2 t2)
: m_t1(t1), m_t2(t2) {}
template <usize I>
auto get() const -> auto {
if constexpr (I == 0) {
return m_t1;
}
if constexpr (I == 1) {
return m_t2;
}
}
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpadded"
const T1 m_t1;
const T2 m_t2;
#pragma clang diagnostic pop
};
} // namespace br