<commit_before>#ifndef _DG_ADT_QUEUE_H_
#define _DG_ADT_QUEUE_H_

#include <stack>
#include <queue>
#include <set>

namespace dg {
namespace ADT {

template <typename ValueT>
class QueueLIFO
{
public:
    ValueT pop()
    {
        ValueT ret = Container.top();
        Container.pop();

        return ret;
    }

    ValueT& top()
    {
        return Container.top();
    }

    void push(const ValueT& what)
    {
        Container.push(what);
    }

    bool empty() const
    {
        return Container.empty();
    }

    size_t size() const
    {
        return Container.size();
    }

    void swap(QueueLIFO<ValueT>& oth)
    {
        Container.swap(oth.Container);
    }

private:
    std::stack<ValueT> Container;
};

template <typename ValueT>
class QueueFIFO
{
public:
    ValueT pop()
    {
        ValueT ret = Container.front();
        Container.pop();

        return ret;
    }

    ValueT& top()
    {
        return Container.top();
    }

    void push(const ValueT& what)
    {
        Container.push(what);
    }

    bool empty() const
    {
        return Container.empty();
    }

    size_t size() const
    {
        return Container.size();
    }

    void swap(QueueFIFO<ValueT>& oth)
    {
        Container.swap(oth.Container);
    }

private:
    std::queue<ValueT> Container;
};

template <typename ValueT, typename Comp>
class PrioritySet
{
public:
    ValueT pop()
    {
        ValueT ret = *(Container.begin());
        Container.erase(Container.begin());

        return ret;
    }

    void push(const ValueT& what)
    {
        Container.insert(what);
    }

    bool empty() const
    {
        return Container.empty();
    }

    size_t size() const
    {
        return Container.size();
    }

private:
    std::set<ValueT, Comp> Container;
};

} // namespace ADT
} // namespace dg

#endif // _DG_ADT_QUEUE_H_<commit_msg>ADT: do not use size_t in Queues<commit_after>#ifndef _DG_ADT_QUEUE_H_
#define _DG_ADT_QUEUE_H_

#include <stack>
#include <queue>
#include <set>

namespace dg {
namespace ADT {

template <typename ValueT>
class QueueLIFO
{
    using ContainerT = std::stack<ValueT>;

public:
    ValueT pop()
    {
        ValueT ret = Container.top();
        Container.pop();

        return ret;
    }

    ValueT& top()
    {
        return Container.top();
    }

    void push(const ValueT& what)
    {
        Container.push(what);
    }

    bool empty() const
    {
        return Container.empty();
    }

    typename ContainerT::size_type size() const
    {
        return Container.size();
    }

    void swap(QueueLIFO<ValueT>& oth)
    {
        Container.swap(oth.Container);
    }

private:
    ContainerT Container;
};

template <typename ValueT>
class QueueFIFO
{
    using ContainerT = std::queue<ValueT>;
public:

    ValueT pop()
    {
        ValueT ret = Container.front();
        Container.pop();

        return ret;
    }

    ValueT& top()
    {
        return Container.top();
    }

    void push(const ValueT& what)
    {
        Container.push(what);
    }

    bool empty() const
    {
        return Container.empty();
    }

    typename ContainerT::size_type size() const
    {
        return Container.size();
    }

    void swap(QueueFIFO<ValueT>& oth)
    {
        Container.swap(oth.Container);
    }

private:
    ContainerT Container;
};

template <typename ValueT, typename Comp>
class PrioritySet
{
    using ContainerT = std::set<ValueT, Comp>;
public:
    ValueT pop()
    {
        ValueT ret = *(Container.begin());
        Container.erase(Container.begin());

        return ret;
    }

    void push(const ValueT& what)
    {
        Container.insert(what);
    }

    bool empty() const
    {
        return Container.empty();
    }

    typename ContainerT::size_type size() const
    {
        return Container.size();
    }

private:
    ContainerT Container;
};

} // namespace ADT
} // namespace dg

#endif // _DG_ADT_QUEUE_H_
{'fraction_non_alphanumeric': 0.11897513952308472, 'fraction_numerical': 0.0, 'mean_word_length': 2.109621451104101, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6563218', 'n_tokens_mistral': 1311, 'n_tokens_neox': 1266, 'n_words': 287}