| Home | Libraries | People | FAQ | More

## Class template metadata_base

boost::histogram::axis::metadata_base — Meta data holder with space optimization for empty meta data types.

## Synopsis

    // In header: <boost/histogram/axis/metadata_base.hpp>

    template<typename Metadata>
    class metadata_base {
    public:

      // protected member functions
      metadata_base() = default;
      metadata_base(const metadata_base &) = default;
      metadata_base & operator=(const metadata_base &) = default;
      metadata_base(metadata_base &&) noexcept;
      metadata_base(metadata_type &&) noexcept;
      metadata_base & operator=(metadata_base &&) noexcept;

      // public member functions
      metadata_type & metadata() noexcept;
      metadata_type & metadata() const noexcept;
    };

## Description

Allows write-access to metadata even if const.

### Template Parameters

1.     typename Metadata

   Wrapped meta data type.

### `metadata_base` protected member functions

1.     metadata_base() = default;

2.     metadata_base(const metadata_base &) = default;

3.     metadata_base & operator=(const metadata_base &) = default;

4.     metadata_base(metadata_base && o) noexcept;

5.     metadata_base(metadata_type && o) noexcept;

6.     metadata_base & operator=(metadata_base && o) noexcept;

### `metadata_base` public member functions

1.     metadata_type & metadata() noexcept;

   Returns reference to metadata.

2.     metadata_type & metadata() const noexcept;

   Returns reference to mutable metadata from const axis.