1#ifndef TATAMI_INDEX_TO_CONTAINER_HPP
2#define TATAMI_INDEX_TO_CONTAINER_HPP
8#include "sanisizer/sanisizer.hpp"
15template<
typename Left_,
typename Right_>
16bool safe_non_negative_equal(Left_ l, Right_ r) {
17 return l >= 0 && r >= 0 && sanisizer::is_equal(l, r);
33template<
typename Container_,
typename Index_>
38 typedef typename std::conditional<std::numeric_limits<std::size_t>::max() < std::numeric_limits<Index_>::max(), std::size_t, Index_>::type Intermediate;
39 sanisizer::can_cast<decltype(std::declval<Container_>().size())>(
static_cast<Intermediate
>(x));
53template<
typename Container_,
typename Index_>
69template<
typename Container_,
typename Index_,
typename ... Args_>
72 typedef typename std::conditional<std::numeric_limits<std::size_t>::max() < std::numeric_limits<Index_>::max(), std::size_t, Index_>::type Intermediate;
73 return sanisizer::create<Container_>(
static_cast<Intermediate
>(x), std::forward<Args_>(args)...);
87template<
typename Container_,
typename Index_,
typename ... Args_>
Flexible representations for matrix data.
Definition Extractor.hpp:15
decltype(std::declval< Container_ >().size()) cast_Index_to_container_size(Index_ x)
Definition Index_to_container.hpp:54
void resize_container_to_Index_size(Container_ &container, Index_ x, Args_ &&... args)
Definition Index_to_container.hpp:88
Index_ can_cast_Index_to_container_size(Index_ x)
Definition Index_to_container.hpp:34
Container_ create_container_of_Index_size(Index_ x, Args_ &&... args)
Definition Index_to_container.hpp:70