Support Class Library
A set of tools providing classes and utility
Classes | Namespaces | Macros | Variables
Optional.h File Reference
#include <scl/macros.h>
#include <scl/exceptions/EmptyOptionalAccess.h>
#include <scl/tools/meta/enable_if.h>
#include <scl/tools/meta/void_t.h>
#include <scl/tools/meta/is_same.h>
#include <scl/tools/meta/is_instance.h>
#include <scl/tools/meta/exists.h>
#include <scl/tools/meta/type_check.h>
#include <scl/tools/meta/type_query.h>
#include <scl/utils/toString.h>
#include <scl/utils/RawStorage.h>
#include <scl/tools/meta/defines_scl_to_string.h>
#include <iostream>
#include <scl/tools/iostream/nl.h>
#include <scl/tools/meta/conditional.h>
#include <scl/concepts/require.h>
#include <scl/concepts/Movable.h>

Go to the source code of this file.

Classes

struct  scl::utils::None
 An empty class serving as the type of an empty Optional<T> More...
 
class  scl::utils::ToString< None >
 A specialization of ToString for None type. More...
 
class  scl::utils::Optional< T >
 A class that allows the use of optional types (might be there) More...
 

Namespaces

 scl
 Global namespace of the SCL.
 
 scl::utils
 Utility classes (and rare functions)
 

Macros

#define TPL
 
#define SCL_TPL
 
#define SCL_TPL   template<class U/*, class = META::enable_if_t<!META::is_same<U,T>()>*/>
 

Variables

constexpr None scl::utils::none = None{}
 A constant global variable of type None. More...
 

Macro Definition Documentation

◆ SCL_TPL [1/2]

#define SCL_TPL
Value:
template <class U, class = META::enable_if_t<\
!META::is_same<U, None>()\
&& !META::is_same<U, Optional>()\
&& !META::is_instance<scl::utils::Optional, U>()\
>>
typename std::enable_if< B, T >::type enable_if_t
An handy type alias for the result of std::enable_if.
Definition: enable_if.h:12

Definition at line 494 of file Optional.h.

◆ SCL_TPL [2/2]

#define SCL_TPL   template<class U/*, class = META::enable_if_t<!META::is_same<U,T>()>*/>

Definition at line 494 of file Optional.h.

◆ TPL

#define TPL
Value:
template <class U, class = META::enable_if_t<\
!META::is_same<META::decay_t<U>, META::decay_t<T>>()\
&& !META::is_same<META::decay_t<U>, None>()\
&& !META::is_same<META::decay_t<U>, Optional>()\
>>
constexpr bool is_same()
An handy function for the result of std::is_same.
Definition: is_same.h:12
typename std::enable_if< B, T >::type enable_if_t
An handy type alias for the result of std::enable_if.
Definition: enable_if.h:12

Definition at line 232 of file Optional.h.