Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
DerThorsten committed Jul 26, 2024
1 parent bdcf95d commit 034f39c
Showing 1 changed file with 41 additions and 4 deletions.
45 changes: 41 additions & 4 deletions include/sparrow/array/typed_array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,35 +69,72 @@ namespace sparrow
typed_array_impl(typed_array_impl&& rhs);

// fixed-layout non-nullable

///@{
/**
* Constructs a typed array with a fixed-size layout from a range of values.
*
* The range must be a range of values convertible to `T` and the elements must not be nullable.
*
* @tparam R The type of the range.
* @param range The range of values to construct the array from.
*/
template <class R>
requires std::ranges::range<R>
&& std::convertible_to<std::ranges::range_value_t<R>, T>
&& (!is_nullable_v<std::ranges::range_value_t<R>>)
&& mpl::is_type_instance_of_v<L, fixed_size_layout>
typed_array_impl(R&& range);
///@}

// fixed-layout nullable
///@{
/**
* Constructs a typed array with a fixed-size layout from a range of nullable values.
*
* The range must be a range of values convertible to `T` and the elements must be nullable.
*
* @tparam R The type of the range.
* @param range The range of values to construct the array from.
*/
template <class R>
requires std::ranges::range<R>
&& is_nullable_of_convertible_to<std::ranges::range_value_t<R>, T>
&& mpl::is_type_instance_of_v<L, fixed_size_layout>
typed_array_impl(R&& range);
///@}

// variable-layout non-nullable
///@{
/**
* Constructs a typed array with a variable-size layout from a range of values.
*
* The range must be a range of values convertible to `T` and the elements must not be nullable.
*
* @tparam R The type of the range.
* @param range The range of values to construct the array from.
*/
template <class R>
requires std::ranges::range<R>
&& std::convertible_to<std::ranges::range_value_t<R>, T>
&& (!is_nullable_v<std::ranges::range_value_t<R>>)
&& mpl::is_type_instance_of_v<L, variable_size_binary_layout>
typed_array_impl(R&& range);
///@}

// variable-layout nullable
///@{
/**
* Constructs a typed array with a variable-size layout from a range of nullable values.
*
* The range must be a range of values convertible to `T` and the elements must be nullable.
*
* @tparam R The type of the range.
* @param range The range of values to construct the array from.
*/
template <class R>
requires std::ranges::range<R>
&& is_nullable_of_convertible_to<std::ranges::range_value_t<R>, T>
&& mpl::is_type_instance_of_v<L, variable_size_binary_layout>
typed_array_impl(R&& range);

///@}

typed_array_impl& operator=(const typed_array_impl& rhs);
typed_array_impl& operator=(typed_array_impl&& rhs);
Expand Down

0 comments on commit 034f39c

Please sign in to comment.