Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Click here to view the latest version of this page.

Boost.Flyweight Tags reference



Contents

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.




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)