<commit_before>// This file is part of The New Aspell
// Copyright (C) 2001-2003 by <NAME> under the GNU LGPL license
// version 2.0 or 2.1.  You should have received a copy of the LGPL
// license along with this library if you did not you can find
// it at http://www.gnu.org/.

#ifndef ASPELL_VECTOR__HPP
#define ASPELL_VECTOR__HPP

#include <vector>

namespace aspell
{
  template <typename T>
  class Vector : public std::vector<T>
  {
  public:

#if defined _MSC_VER && _MSC_VER < 1300
    // Bring type definitions from the std::vector class to aspell::Vector
    typedef T value_type;
    typedef std::vector<T>::size_type size_type;
    typedef std::vector<T>::difference_type difference_type;
    typedef std::vector<T>::reference reference;
    typedef std::vector<T>::const_reference const_reference;
    typedef std::vector<T>::iterator iterator;
    typedef std::vector<T>::const_iterator const_iterator;
#endif //_MSC_VER

    Vector() {}
    Vector(unsigned int s) : std::vector<T>(s) {}
    Vector(unsigned int s, const T & val) : std::vector<T>(s, val) {}

    void append(T t) {
      this->push_back(t);
    }
    void append(const T * begin, unsigned int size) {
      this->insert(this->end(), begin, begin+size);
    }
    void append(const T * begin, const T * end) {
      this->insert(this->end(), begin, end);
    }
    int alloc(int s) {
      int pos = this->size();
      this->resize(pos + s);
      return pos;
    }
    T * data() {return &*this->begin();}
    T * data(int pos) {return &*this->begin() + pos;}<commit_msg>Remove hacks for now ancient compilers that have poor support for the C++ standard, mainly VC6 and BCB5.5.<commit_after>// This file is part of The New Aspell
// Copyright (C) 2001-2003 by <NAME> under the GNU LGPL license
// version 2.0 or 2.1.  You should have received a copy of the LGPL
// license along with this library if you did not you can find
// it at http://www.gnu.org/.

#ifndef ASPELL_VECTOR__HPP
#define ASPELL_VECTOR__HPP

#include <vector>

namespace aspell
{
  template <typename T>
  class Vector : public std::vector<T>
  {
  public:
    Vector() {}
    Vector(unsigned int s) : std::vector<T>(s) {}
    Vector(unsigned int s, const T & val) : std::vector<T>(s, val) {}

    void append(T t) {
      this->push_back(t);
    }
    void append(const T * begin, unsigned int size) {
      this->insert(this->end(), begin, begin+size);
    }
    void append(const T * begin, const T * end) {
      this->insert(this->end(), begin, end);
    }
    int alloc(int s) {
      int pos = this->size();
      this->resize(pos + s);
      return pos;
    }
    T * data() {return &*this->begin();}
    T * data(int pos) {return &*this->begin() + pos;}
{'fraction_non_alphanumeric': 0.13964627855563744, 'fraction_numerical': 0.011422254974207811, 'mean_word_length': 3.1513761467889907, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3901039', 'n_tokens_mistral': 910, 'n_tokens_neox': 879, 'n_words': 293}