폰이라 코드 하이라이팅은 못함

#pragma once

#include
#include
#include

namespace
{
template std::string strize(T operand)
{
std::ostringstream stream;
stream << operand;
return stream.str();
}
template class Nullable
{
private:
T m_value;
bool m_hasValue;
public:
operator bool() const
{
return m_hasValue;
}
T operator()()
{
if (!m_hasValue) throw "InvalidOperationException";
else return m_value;
}
Nullable() : m_hasValue(false){}
T& operator=(T operand)
{
m_value = operand;
m_hasValue = true;
return m_value;
}
};
template std::string append(T first)
{
return strize(first);
}

template std::string append(T first, Ts ... rest)
{
return strization(first).append("\0").append(append(rest ...));
}
}

namespace memo
{
template auto memoize(Func func, Args ... args) -> decltype(func(args ...))
{
static std::unordered_map>> memory;
auto& pos = memory[&func][append(args ...)];
if (!pos) pos = func(args ...);
return pos();
}
}

- dc official App