# Boost.Flyweight Tags reference

Key-value flyweights
Boost.Flyweight reference
Factories

## Contents

- Tags
- Header `"boost/flyweight/tag.hpp"` synopsis
  - Class template `tag`

## Tags

A tag is a type of the form `tag<T>` for some arbitrary `T`. In the context of Boost.Flyweight, tags are syntactic artifacts used to differentiate instantiations of the class template `flyweight` which would otherwise be identical. Tagging a `flyweight` instantiation with a tag type local to a given context ensures that the global resources of that instantiation (for instance, the associated factory class) will not be unintentionally shared by other areas of the program.

## Header `"boost/flyweight/tag.hpp"` synopsis

>     namespace boost{

>     namespace flyweights{

>     template<typename T>
>     struct tag;

>     } // namespace boost::flyweights

>     } // namespace boost

### Class template `tag`

For any type `T`, `tag<T>` is a suitable tag for use in instantiations of `flyweight`.

Key-value flyweights
Boost.Flyweight reference
Factories

Revised August 11th 2008

© Copyright 2006-2008 Joaquín M López Muñoz. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)