utility.hpp File Reference
Include dependency graph for utility.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  capture< T >
 
struct  erased_type
 
struct  scope_guard< Callable >
 

Namespaces

 core
 
Copyright © 2013 - 2015 MNMLSTC.
 
 core::v2
 

Typedefs

template<::std::size_t... I>
using index_sequence = integer_sequence<::std::size_t, I... >
 
template<class... Ts>
using index_sequence_for = make_index_sequence< sizeof...(Ts)>
 
template<class T , T... I>
using integer_sequence = meta::integer_sequence< T, I... >
 
template<::std::size_t N>
using make_index_sequence = make_integer_sequence<::std::size_t, N >
 
template<class T , T N>
using make_integer_sequence = typename meta::iota< T, N, N >::type
 

Functions

inline ::std::uintptr_t as_int (void const *ptr) noexcept
 
template
<
class
E
>
constexpr auto as_under (E e) noexcept -> meta::when< std::is_enum< E >::value, underlying_type_t< E > >
 
template
<
class
T
>
void const * as_void (T const *ptr)
 
template
<
class
T
>
void * as_void (T *ptr)
 
template
<
class
T
>
void const * as_void (T const &ref)
 
template
<
class
T
>
void * as_void (T &ref)
 
template
<
class
T
,
class
U
=
T
>
exchange (T &obj, U &&value) noexcept(meta::all< ::std::is_nothrow_move_constructible< T >, ::std::is_nothrow_assignable< add_lvalue_reference_t< T >, U > >())
 
template
<
class
T
>
constexpr T && forward (remove_reference_t< T > &t) noexcept
 
template
<
class
T
>
constexpr T && forward (remove_reference_t< T > &&t) noexcept
 
template
<
class
T
>
auto make_capture (remove_reference_t< T > &ref) -> capture< T >
 
template
<
class
T
>
auto make_capture (remove_reference_t< T > &&ref) -> capture< T >
 
template
<
class
Callable
>
auto make_scope_guard (Callable &&callable) -> scope_guard< decay_t< Callable >>
 
template
<
class
T
>
constexpr auto move (T &&t) noexcept -> decltype(static_cast< remove_reference_t< T > &&>(t))
 
template<::std::size_t N, class T , class... Ts>
constexpr auto value_at (T &&value, Ts &&...) -> enable_if_t< N==0and N<(sizeof...(Ts)+1)
 
template<::std::size_t N, class T , class... Ts>
constexpr autodecltype(::core::forward< T >(value)) constexpr auto value_at (T &&, Ts &&... values) -> enable_if_t< N !=0and N<(sizeof...(Ts)+1)