## Class cast_source

boost::log::attributes::cast_source

## Synopsis

    // In header: <boost/log/attributes/attribute_cast.hpp>

    class cast_source {
    public:
      // construct/copy/destruct
      explicit cast_source(attribute::impl *);

      // public member functions
      template<typename T> T * as() const;
    };

## Description

The class holds a reference to the attribute factory implementation being casted

### `cast_source` public construct/copy/destruct

1.     explicit cast_source(attribute::impl * p);

   Initializing constructor. Creates a source that refers to the specified factory implementation.

### `cast_source` public member functions

1.     template<typename T> T * as() const;

   The function attempts to cast the aggregated pointer to the implementation to the specified type.

   Returns: | The converted pointer or `NULL`, if the conversion fails.