| Home | Libraries | People | FAQ | More

### single_view

`single_view` is a view into a value as a single element sequence.

##### Header

    #include <boost/fusion/view/single_view.hpp>
    #include <boost/fusion/include/single_view.hpp>

##### Synopsis

    template <typename T>
    struct single_view;

##### Template parameters

Parameter | Description | Default
--- | --- | ---
`T` | Any type |

##### Model of

- Random Access Sequence

Notation

`S`

  A `single_view` type

`s`, `s2`

  Instances of `single_view`

`x`

  An instance of `T`

##### Expression Semantics

Semantics of an expression is defined only where it differs from, or is not defined in Random Access Sequence.

Expression | Semantics
--- | ---
`S(x)` | Creates a `single_view` from `x`.
`S(s)` | Copy constructs a `single_view` from another `single_view`, `s`.
`s = s2` | Assigns to a `single_view`, `s`, from another `single_view`, `s2`.

##### Example

    single_view<int> view(3);
    std::cout << view << std::endl;