2017-03-15 18:42:02 +01:00
|
|
|
#ifndef meta_hh_INCLUDED
|
|
|
|
#define meta_hh_INCLUDED
|
|
|
|
|
|
|
|
namespace Kakoune
|
|
|
|
{
|
2017-03-16 10:57:39 +01:00
|
|
|
inline namespace Meta
|
2017-03-15 18:42:02 +01:00
|
|
|
{
|
|
|
|
|
|
|
|
template<typename T> struct Type {};
|
|
|
|
|
|
|
|
}
|
2017-05-17 21:20:31 +02:00
|
|
|
|
|
|
|
template<typename T, size_t N>
|
|
|
|
struct Array
|
|
|
|
{
|
|
|
|
constexpr size_t size() const { return N; }
|
|
|
|
constexpr const T& operator[](int i) const { return m_data[i]; }
|
|
|
|
constexpr const T* begin() const { return m_data; }
|
|
|
|
constexpr const T* end() const { return m_data+N; }
|
|
|
|
|
|
|
|
T m_data[N];
|
|
|
|
};
|
|
|
|
|
2017-03-15 18:42:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif // meta_hh_INCLUDED
|