| Home | Libraries | People | FAQ | More

## size

### Authors

- Glen Fernandes

### Overview

The header <boost/core/size.hpp> provides function templates `size` to obtain the number of elements in a range.

### Reference

    namespace boost {

    template<class C>
    constexpr auto
    size(const C& c) noexcept(noexcept(c.size())) -> decltype(c.size());

    template<class T, std::size_t N>
    constexpr std::size_t
    size(T(&)[N]) noexcept;

    } /* boost */

#### Functions

`template<class C> constexpr auto size(const C& c) noexcept(noexcept(c.size())) -> decltype(c.size());`

  Returns `c.size()`.

`template<class T, std::size_t N> constexpr std::size_t size(T(&)[N]) noexcept;`

  Returns `N`.