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

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext
websocket::stream::lowest_layer_type

The type of the lowest layer.

Synopsis
using lowest_layer_type = get_lowest_layer< next_layer_type >;

This will be a type alias for T::lowest_layer_type if it exists, else it will be an alias for T.

Example

Declaring a wrapper:

template<class Stream>
struct stream_wrapper
{
    using next_layer_type = typename std::remove_reference<Stream>::type;
    using lowest_layer_type = get_lowest_layer<stream_type>;
};

Defining a metafunction:

template<class T>
using is_stream_wrapper : std::integral_constant<bool,
    ! std::is_same<T, get_lowest_layer<T>>::value> {};
Description

PrevUpHomeNext