scnlib  0.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tuple_return.h File Reference
#include "scan.h"
#include <functional>
#include <tuple>

Go to the source code of this file.

Classes

struct  scn::detail::integer_sequence< T, I >
 
struct  scn::detail::iseq_if_c_impl< C, T, E >
 
struct  scn::detail::iseq_if_c_impl< true, T, E >
 
struct  scn::detail::iseq_if_c_impl< false, T, E >
 
struct  scn::detail::iseq_identity< T >
 
struct  scn::detail::append_integer_sequence< S1, S2 >
 
struct  scn::detail::append_integer_sequence< integer_sequence< T, I...>, integer_sequence< T, J...> >
 
struct  scn::detail::make_integer_sequence_impl< T, N >
 
struct  scn::detail::make_integer_sequence_impl_< T, N >
 
struct  scn::detail::make_integer_sequence_impl< T, N >
 

Namespaces

 scn
 
 scn::detail
 

Typedefs

template<bool C, typename T , typename E >
using scn::detail::iseq_if_c = typename iseq_if_c_impl< C, T, E >::type
 
template<typename T , T N>
using scn::detail::make_integer_sequence = typename detail::make_integer_sequence_impl< T, N >::type
 
template<std::size_t... I>
using scn::detail::index_sequence = integer_sequence< std::size_t, I...>
 
template<std::size_t N>
using scn::detail::make_index_sequence = make_integer_sequence< std::size_t, N >
 
template<typename... T>
using scn::detail::index_sequence_for = make_integer_sequence< std::size_t, sizeof...(T)>
 

Functions

template<typename Fn , typename... Args, typename std::enable_if< std::is_member_pointer< typename std::decay< Fn >::type >::value >::type * = nullptr, int = 0>
constexpr auto scn::detail::invoke (Fn &&f, Args &&...args) noexcept(noexcept(std::mem_fn(f)(std::forward< Args >(args)...))) -> decltype(std::mem_fn(f)(std::forward< Args >(args)...))
 
template<typename Fn , typename... Args, typename std::enable_if<!std::is_member_pointer< typename std::decay< Fn >::type >::value >::type * = nullptr>
constexpr auto scn::detail::invoke (Fn &&f, Args &&...args) noexcept(noexcept(std::forward< Fn >(f)(std::forward< Args >(args)...))) -> decltype(std::forward< Fn >(f)(std::forward< Args >(args)...))
 
template<class F , class Tuple , std::size_t... I>
constexpr auto scn::detail::apply_impl (F &&f, Tuple &&t, index_sequence< I...>) noexcept(noexcept(detail::invoke(std::forward< F >(f), std::get< I >(std::forward< Tuple >(t))...))) -> decltype(detail::invoke(std::forward< F >(f), std::get< I >(std::forward< Tuple >(t))...))
 
template<class F , class Tuple >
constexpr auto scn::detail::apply (F &&f, Tuple &&t) noexcept(noexcept(detail::apply_impl(std::forward< F >(f), std::forward< Tuple >(t), make_index_sequence< std::tuple_size< typename std::remove_reference< Tuple >::type >::value >{}))) -> decltype(detail::apply_impl(std::forward< F >(f), std::forward< Tuple >(t), make_index_sequence< std::tuple_size< typename std::remove_reference< Tuple >::type >::value >
 
template<typename... Args, typename Range , typename Format >
SCN_NODISCARD auto scn::scan_tuple (const Range &r, Format f) -> std::tuple< detail::scan_result_for_range_t< const Range & >, Args...>
 
template<typename... Args, typename Range , typename Format >
SCN_NODISCARD auto scn::scan_tuple (Range &&r, Format f) -> typename std::enable_if< !std::is_reference< Range >::value, std::tuple< detail::scan_result_for_range_t< Range >, Args...>>::type
 
template<typename... Args, typename Range >
SCN_NODISCARD auto scn::scan_tuple (const Range &r, detail::default_t) -> std::tuple< detail::scan_result_for_range_t< const Range & >, Args...>
 
template<typename... Args, typename Range >
SCN_NODISCARD auto scn::scan_tuple (Range &&r, detail::default_t) -> typename std::enable_if< !std::is_reference< Range >::value, std::tuple< detail::scan_result_for_range_t< Range >, Args...>>::type