AsmGrader 0.0.0
Loading...
Searching...
No Matches
to_static_range.hpp File Reference
#include <asmgrader/meta/static_size.hpp>
#include <libassert/assert.hpp>
#include <range/v3/algorithm/copy.hpp>
#include <range/v3/iterator/access.hpp>
#include <range/v3/range/access.hpp>
#include <range/v3/range/concepts.hpp>
#include <range/v3/range/conversion.hpp>
#include <range/v3/range/primitives.hpp>
#include <range/v3/range/traits.hpp>
#include <range/v3/view/view.hpp>
#include <array>
#include <cstddef>
#include <utility>
Include dependency graph for to_static_range.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  asmgrader::to_static_container_fn< Container >
 Range adaptor function to convert a range to a static (sized at compile time) container, like std::array, std::tuple, etc. More...
 
struct  asmgrader::to_array_like_fn< N, ArrayLike >
 
struct  asmgrader::detail::maybe_static_to_impl< Container >
 

Namespaces

namespace  asmgrader
 
namespace  asmgrader::detail
 

Functions

template<ranges::range StaticallySizedContainer>
requires (HasStaticSize<StaticallySizedContainer>)
constexpr auto asmgrader::static_to ()
 A pipeable adaptor to convert to any static container. Just like ranges::to, but statically sized.
 
template<std::size_t N, template< typename, std::size_t > typename ArrayLike>
constexpr auto asmgrader::static_to ()
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Specify a static size and an "array-like" class template to convert to.
 
template<std::size_t N>
constexpr auto asmgrader::to_array ()
 A pipeable adaptor to a std::array.
 
template<ranges::range Container>
constexpr auto asmgrader::maybe_static_to ()
 A pipeable adaptor to convert to any container, statically or dynamically sized. Internally uses static_to for supported containers, and ranges::to for all others.