#include "readlinebuf.ih"

ReadLineBuf &ReadLineBuf::initialize(std::string const &prompt,
                                     size_t historySize, Type type)
{
    if (s_readLineBuf != 0)
        throw logic_error("ReadLineBuf already initialized");

    static ReadLineBuf buf{ prompt, historySize, type };
    s_readLineBuf = &buf;
    return buf;
}
