<commit_before>// Copyright 2015-present <NAME>. All rights reserved.

#ifndef OFP_EXPERIMENTERPROPERTY_H_
#define OFP_EXPERIMENTERPROPERTY_H_

#include "ofp/byteorder.h"
#include "ofp/byterange.h"

namespace ofp {

class PropertyList;

namespace detail {

OFP_BEGIN_IGNORE_PADDING

template <class PropEnum, PropEnum PropType>
class ExperimenterProperty {
 public:
  constexpr static PropEnum type() { return PropType; }

  enum { FixedHeaderSize = 12 };

  ExperimenterProperty(UInt32 experimenterId, UInt32 expType,
                       const ByteRange &data)
      : len_(UInt16_narrow_cast(FixedHeaderSize + data.size())),
        experimenter_{experimenterId},
        expType_{expType},
        data_{data} {}

  UInt32 size() const { return len_; }
  UInt32 experimenter() const { return experimenter_; }
  UInt32 expType() const { return expType_; }

  ByteRange expData() const {
    assert(len_ >= FixedHeaderSize);
    return ByteRange{BytePtr(this) + FixedHeaderSize, size() - FixedHeaderSize};
  }

  ByteRange valueRef() const { return data_; }

 private:
  Big16 type_ = type();
  Big16 len_;
  Big32 experimenter_;
  Big32 expType_;
  ByteRange data_;

  friend class PropertyList;
};<commit_msg>Fix gcc compiler issue.<commit_after>// Copyright 2015-present <NAME>. All rights reserved.

#ifndef OFP_EXPERIMENTERPROPERTY_H_
#define OFP_EXPERIMENTERPROPERTY_H_

#include "ofp/byteorder.h"
#include "ofp/byterange.h"

namespace ofp {

class PropertyList;

namespace detail {

OFP_BEGIN_IGNORE_PADDING

template <class PropEnum, PropEnum PropType>
class ExperimenterProperty {
 public:
  constexpr static PropEnum type() { return PropType; }

  enum { FixedHeaderSize = 12 };

  ExperimenterProperty(UInt32 experimenterId, UInt32 expType,
                       const ByteRange &data)
      : len_(UInt16_narrow_cast(FixedHeaderSize + data.size())),
        experimenter_{experimenterId},
        expType_{expType},
        data_{data} {}

  UInt32 size() const { return len_; }
  UInt32 experimenter() const { return experimenter_; }
  UInt32 expType() const { return expType_; }

  ByteRange expData() const {
    assert(len_ >= FixedHeaderSize);
    return ByteRange{BytePtr(this) + FixedHeaderSize, size() - FixedHeaderSize};
  }

  ByteRange valueRef() const { return data_; }

 private:
  Big16 type_ = type();
  Big16 len_;
  Big32 experimenter_;
  Big32 expType_;
  ByteRange data_;

  friend class ofp::PropertyList;
};
{'fraction_non_alphanumeric': 0.09529652351738241, 'fraction_numerical': 0.0212678936605317, 'mean_word_length': 4.064182194616977, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '1192299', 'n_tokens_mistral': 820, 'n_tokens_neox': 754, 'n_words': 195}