Detection idiom
Technical Specifications » Library Fundamentals TS
Collaboration diagram for Detection idiom:

#define | __cpp_lib_experimental_detect
template<typename... >
using | std::experimental::void_t = void
template<template< typename... > class _Op, typename... _Args>
using | std::experimental::is_detected = typename std::__detector< nonesuch, void, _Op, _Args... >::value_t
template<template< typename... > class _Op, typename... _Args>
using | std::experimental::detected_t = typename std::__detector< nonesuch, void, _Op, _Args... >::type
template<typename _Default , template< typename... > class _Op, typename... _Args>
using | std::experimental::detected_or = std::__detected_or< _Default, _Op, _Args... >
template<typename _Default , template< typename... > class _Op, typename... _Args>
using | std::experimental::detected_or_t = typename detected_or< _Default, _Op, _Args... >::type
template<typename _Expected , template< typename... > class _Op, typename... _Args>
using | std::experimental::is_detected_exact = is_same< _Expected, detected_t< _Op, _Args... > >
template<typename _To , template< typename... > class _Op, typename... _Args>
using | std::experimental::is_detected_convertible = is_convertible< detected_t< _Op, _Args... >, _To >
template<template< typename... > class _Op, typename... _Args>
constexpr bool | std::experimental::is_detected_v
template<typename _Expected , template< typename... > class _Op, typename... _Args>
constexpr bool | std::experimental::is_detected_exact_v
template<typename _To , template< typename... > class _Op, typename... _Args>
constexpr bool | std::experimental::is_detected_convertible_v

## Detailed Description

Since
  Library Fundamentals TS v2. C++14.

## Macro Definition Documentation

## __cpp_lib_experimental_detect

#define __cpp_lib_experimental_detect

A metafunction that always yields void, used for detecting valid types.

Definition at line 250 of file experimental/type_traits.

## Typedef Documentation

## detected_or

template<typename _Default , template< typename... > class _Op, typename... _Args>

using std::experimental::fundamentals_v2::detected_or = typedef std::__detected_or<_Default, _Op, _Args...>

A metafunction that always yields void, used for detecting valid types.

Definition at line 281 of file experimental/type_traits.

## detected_or_t

template<typename _Default , template< typename... > class _Op, typename... _Args>

using std::experimental::fundamentals_v2::detected_or_t = typedef typename detected_or<_Default, _Op, _Args...>::type

A metafunction that always yields void, used for detecting valid types.

Definition at line 284 of file experimental/type_traits.

## detected_t

template<template< typename... > class _Op, typename... _Args>

using std::experimental::fundamentals_v2::detected_t = typedef typename std::__detector<nonesuch, void, _Op, _Args...>::type

A metafunction that always yields void, used for detecting valid types.

Definition at line 277 of file experimental/type_traits.

## is_detected

template<template< typename... > class _Op, typename... _Args>

using std::experimental::fundamentals_v2::is_detected = typedef typename std::__detector<nonesuch, void, _Op, _Args...>::value_t

A metafunction that always yields void, used for detecting valid types.

Definition at line 270 of file experimental/type_traits.

## is_detected_convertible

template<typename _To , template< typename... > class _Op, typename... _Args>

using std::experimental::fundamentals_v2::is_detected_convertible = typedef is_convertible<detected_t<_Op, _Args...>, _To>

A metafunction that always yields void, used for detecting valid types.

Definition at line 294 of file experimental/type_traits.

## is_detected_exact

template<typename _Expected , template< typename... > class _Op, typename... _Args>

using std::experimental::fundamentals_v2::is_detected_exact = typedef is_same<_Expected, detected_t<_Op, _Args...> >

A metafunction that always yields void, used for detecting valid types.

Definition at line 287 of file experimental/type_traits.

## void_t

template<typename... >

using std::experimental::fundamentals_v2::void_t = typedef void

A metafunction that always yields void, used for detecting valid types.

Definition at line 255 of file experimental/type_traits.

## Variable Documentation

## is_detected_convertible_v

template<typename _To , template< typename... > class _Op, typename... _Args>

constexpr bool std::experimental::fundamentals_v2::is_detected_convertible_v

constexpr

A metafunction that always yields void, used for detecting valid types.

Definition at line 298 of file experimental/type_traits.

## is_detected_exact_v

template<typename _Expected , template< typename... > class _Op, typename... _Args>

constexpr bool std::experimental::fundamentals_v2::is_detected_exact_v

constexpr

A metafunction that always yields void, used for detecting valid types.

Definition at line 290 of file experimental/type_traits.

## is_detected_v

template<template< typename... > class _Op, typename... _Args>

constexpr bool std::experimental::fundamentals_v2::is_detected_v

constexpr

A metafunction that always yields void, used for detecting valid types.

Definition at line 274 of file experimental/type_traits.