<commit_before>#ifndef BOOLEAN_REF_H_H7MFNBMO
#define BOOLEAN_REF_H_H7MFNBMO

#include "enum_ref.h"

namespace mfast
{

struct boolean
{
  typedef enum_field_instruction_ex<boolean> instruction_type;
  static const instruction_type* instruction();
};

class boolean_cref
  : public enum_cref
{
public:
  typedef enum_cref base_type;
  typedef bool element_type;
  typedef boolean::instruction_type instruction_type;
  typedef const instruction_type* instruction_cptr;

  boolean_cref(
    const mfast::value_storage* storage=0,
    instruction_cptr            instruction=0)
    : base_type(storage, instruction)
  {
  }

  explicit boolean_cref(const field_cref& other)
    : base_type(other)
  {
  }

  bool is_false() const
  {
    return !value();
  }

  bool is_true() const
  {
    return value();
  }

  bool value() const
  {
    return base_type::value();
  }

};

class boolean_mref
  : public make_field_mref<boolean_cref>
{
public:
  typedef make_field_mref<boolean_cref> base_type;
  typedef bool element_type;
  typedef boolean::instruction_type instruction_type;
  typedef const instruction_type* instruction_cptr;

  boolean_mref(
    mfast::allocator*     alloc=0,
    mfast::value_storage* storage=0,
    instruction_cptr      instruction=0)
    : base_type(alloc, storage, instruction)
  {
  }

  explicit boolean_mref(const mfast::field_mref_base& other)
    : base_type(other)
  {
  }

  void as_false() const
  {
    this->as(false);
  }

  void as_true() const
  {
    this->as(true);
  }

  void as(bool v) const
  {
    this->storage()->present(1);
    this->storage()->set<uint64_t>(v);
  }

};

} /* mfast */

#endif /* end of include guard: BOOLEAN_REF_H_H7MFNBMO */
<commit_msg>Fixed problem where boolean type not exported in dynamic library build <commit_after>#ifndef BOOLEAN_REF_H_H7MFNBMO
#define BOOLEAN_REF_H_H7MFNBMO
#include "mfast_export.h"
#include "enum_ref.h"

namespace mfast
{

struct MFAST_EXPORT boolean
{
  typedef enum_field_instruction_ex<boolean> instruction_type;
  static const instruction_type* instruction();
};

class boolean_cref
  : public enum_cref
{
public:
  typedef enum_cref base_type;
  typedef bool element_type;
  typedef boolean::instruction_type instruction_type;
  typedef const instruction_type* instruction_cptr;

  boolean_cref(
    const mfast::value_storage* storage=0,
    instruction_cptr            instruction=0)
    : base_type(storage, instruction)
  {
  }

  explicit boolean_cref(const field_cref& other)
    : base_type(other)
  {
  }

  bool is_false() const
  {
    return !value();
  }

  bool is_true() const
  {
    return value();
  }

  bool value() const
  {
    return base_type::value();
  }

};

class boolean_mref
  : public make_field_mref<boolean_cref>
{
public:
  typedef make_field_mref<boolean_cref> base_type;
  typedef bool element_type;
  typedef boolean::instruction_type instruction_type;
  typedef const instruction_type* instruction_cptr;

  boolean_mref(
    mfast::allocator*     alloc=0,
    mfast::value_storage* storage=0,
    instruction_cptr      instruction=0)
    : base_type(alloc, storage, instruction)
  {
  }

  explicit boolean_mref(const mfast::field_mref_base& other)
    : base_type(other)
  {
  }

  void as_false() const
  {
    this->as(false);
  }

  void as_true() const
  {
    this->as(true);
  }

  void as(bool v) const
  {
    this->storage()->present(1);
    this->storage()->set<uint64_t>(v);
  }

};

} /* mfast */

#endif /* end of include guard: BOOLEAN_REF_H_H7MFNBMO */

{'fraction_non_alphanumeric': 0.101994301994302, 'fraction_numerical': 0.0062678062678062675, 'mean_word_length': 3.869625520110957, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 23, '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': '479976', 'n_tokens_mistral': 1240, 'n_tokens_neox': 1235, 'n_words': 248}