<commit_before>// ---------------------------------------------------------------------
//
// Copyright (C) 2019 by the SampleFlow authors.
//
// This file is part of the SampleFlow library.
//
// The deal.II library is free software; you can use it, redistribute
// it, and/or modify it under the terms of the GNU Lesser General
// Public License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
// The full text of the license can be found in the file LICENSE.md at
// the top level directory of deal.II.
//
// ---------------------------------------------------------------------

#ifndef SAMPLEFLOW_UTILITIES_H
#define SAMPLEFLOW_UTILITIES_H

#include <cstddef>
#include <cassert>
#include <type_traits>

namespace SampleFlow
{
  /**
   * A namespace for utility functions in the SampleFlow library.
   */
  namespace Utilities
  {
    namespace internal
    {
      /**
       * A class that defines a member variable `value` that represents
       * whether the class `SampleType` given as template argument allows
       * forming subscripts, i.e., whether it has an `operator[]` that can
       * be used in expressions of the form `sample[i]` where `sample` is
       * an object of type `SampleType`.
       */
      template <typename SampleType>
      struct has_subscript_operator
      {<commit_msg>Document that when taking operator[], the index is an integer.<commit_after>// ---------------------------------------------------------------------
//
// Copyright (C) 2019 by the SampleFlow authors.
//
// This file is part of the SampleFlow library.
//
// The deal.II library is free software; you can use it, redistribute
// it, and/or modify it under the terms of the GNU Lesser General
// Public License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
// The full text of the license can be found in the file LICENSE.md at
// the top level directory of deal.II.
//
// ---------------------------------------------------------------------

#ifndef SAMPLEFLOW_UTILITIES_H
#define SAMPLEFLOW_UTILITIES_H

#include <cstddef>
#include <cassert>
#include <type_traits>

namespace SampleFlow
{
  /**
   * A namespace for utility functions in the SampleFlow library.
   */
  namespace Utilities
  {
    namespace internal
    {
      /**
       * A class that defines a member variable `value` that represents
       * whether the class `SampleType` given as template argument allows
       * forming subscripts, i.e., whether it has an `operator[]` that can
       * be used in expressions of the form `sample[i]` where `sample` is
       * an object of type `SampleType` and where `i` is an integer type.
       */
      template <typename SampleType>
      struct has_subscript_operator
      {
{'fraction_non_alphanumeric': 0.1715686274509804, 'fraction_numerical': 0.004201680672268907, 'mean_word_length': 2.0720430107526884, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '6941694', 'n_tokens_mistral': 729, 'n_tokens_neox': 713, 'n_words': 328}