#ifndef TILE_BASE_INTERNAL_LAZY_INIT_H
#define TILE_BASE_INTERNAL_LAZY_INIT_H

#pragma once
#include "tile/base/never_destroyed.h"

namespace tile {
namespace internal {
template<typename T, typename Tag = void>
T *
LazyInit()
{
    static NeverDestroyed<T> t;
    return t.Get();
};

template<typename T, typename Tag = void>
const T &
LazyInitConstant()
{
    static NeverDestroyed<T> t;
    return *t;
}

}// namespace internal
}// namespace tile

#endif// TILE_BASE_INTERNAL_LAZY_INIT_H
