carl  24.04
Computer ARithmetic Library
SFINAE.h File Reference
#include <carl-common/meta/platform.h>
#include <type_traits>
Include dependency graph for SFINAE.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  carl::overloaded< Ts >
 
struct  carl::dependent_bool_type< B,... >
 
struct  carl::any< T >
 Meta-logical disjunction. More...
 
struct  carl::any< Head, Tail... >
 
struct  carl::all< T >
 Meta-logical conjunction. More...
 
struct  carl::all< Head, Tail... >
 
struct  carl::Void< typename >
 
struct  carl::is_instantiation_of
 
struct  carl::is_instantiation_of< Template, Template< Args... > >
 

Namespaces

 carl
 carl is the main namespace for the library.
 
 carl::dtl
 

Macros

#define has_method_struct(methodname)
 
#define has_function_overload(methodname)
 

Typedefs

template<bool If, typename Then , typename Else >
using carl::Conditional = typename std::conditional< If, Then, Else >::type
 
template<bool B, typename... T>
using carl::Bool = typename dependent_bool_type< B, T... >::type
 
template<typename T >
using carl::Not = Bool<!T::value >
 Meta-logical negation. More...
 
template<typename... Condition>
using carl::EnableIf = typename std::enable_if< all< Condition... >::value, dtl::enabled >::type
 
template<typename... Condition>
using carl::DisableIf = typename std::enable_if< Not< any< Condition... > >::value, dtl::enabled >::type
 
template<bool Condition>
using carl::EnableIfBool = typename std::enable_if< Condition, dtl::enabled >::type
 

Enumerations

enum class  carl::dtl::enabled
 

Functions

template<class... Ts>
 carl::overloaded (Ts...) -> overloaded< Ts... >
 
 carl::has_method_struct (normalize) has_method_struct(is_negative) has_method_struct(is_positive) has_function_overload(is_one) has_function_overload(is_zero) template< template< typename... > class Template
 

Variables

const dtl::enabled carl::dummy = {}
 
template<class >
constexpr bool carl::dependent_false_v = false
 

Detailed Description

Author
Sebastian Junges
Since
September 10, 2013

Definition in file SFINAE.h.

Macro Definition Documentation

◆ has_function_overload

#define has_function_overload (   methodname)
Value:
template<typename T, typename SFINAE = void> \
struct has_##methodname: std::false_type {}; \
template<typename T> \
struct has_##methodname<T, typename Void<decltype( methodname(std::declval<T&>()) )>::type> : std::true_type {};

Definition at line 91 of file SFINAE.h.

◆ has_method_struct

#define has_method_struct (   methodname)
Value:
template<typename T, typename SFINAE = void> \
struct has_##methodname : std::false_type {}; \
template<typename T> \
struct has_##methodname<T, typename Void<decltype( std::declval<T&>().methodname() )>::type> : std::true_type {};

Definition at line 84 of file SFINAE.h.