Silicium
Classes | Namespaces | Functions
variant.hpp File Reference
#include <silicium/is_handle.hpp>
#include <silicium/detail/argument_of.hpp>
#include <new>
#include <array>
#include <memory>
#include <boost/variant/static_visitor.hpp>
#include <boost/mpl/find.hpp>
#include <boost/mpl/push_front.hpp>
#include <boost/mpl/vector.hpp>
#include <boost/mpl/contains.hpp>
#include <boost/integer.hpp>
#include <boost/optional.hpp>
#include <boost/type_traits.hpp>

Go to the source code of this file.

Classes

struct  Si::inplace< T >
 
struct  Si::detail::union_< T >
 
struct  Si::detail::union_< First, T... >
 
struct  Si::detail::union_<>
 
struct  Si::detail::combined_storage< Which, Size >
 
struct  Si::detail::first< Sequence >
 
struct  Si::detail::first< First, Rest... >
 
struct  Si::detail::make_mpl_vector< All >
 
struct  Si::detail::make_mpl_vector< Head, Tail... >
 
struct  Si::detail::make_mpl_vector<>
 
struct  Si::detail::index_of< Element, All >
 
struct  Si::detail::are_noexcept_movable< T >
 
struct  Si::detail::are_noexcept_movable< First, T... >
 
struct  Si::detail::are_noexcept_movable<>
 
struct  Si::detail::construction_visitor< Constructed >
 
struct  Si::detail::variant_base< IsCopyable, T >
 
struct  Si::detail::variant_base< false, T... >
 
struct  Si::detail::variant_base< true, T... >
 
struct  Si::detail::are_copyable< T >
 
struct  Si::detail::are_copyable< First, T... >
 
struct  Si::detail::are_copyable<>
 
struct  Si::detail::select_variant_base< T >
 
struct  Si::detail::ostream_visitor
 
struct  Si::variant< T >
 
struct  Si::hash_visitor
 
struct  Si::try_get_visitor< Element >
 
struct  Si::try_get_ptr_visitor< Element >
 
struct  Si::detail::overloader< Result, Functions >
 
struct  Si::detail::overloader< Result, Head >
 
struct  Si::detail::overloader< Result, Head, Tail... >
 
struct  std::hash< Si::variant< T... > >
 

Namespaces

 Si
 
 Si::detail
 
 std
 

Functions

template<class Visitor , class Variant >
auto Si::apply_visitor (Visitor &&visitor, Variant &&variant) -> typename std::decay< Visitor >::type::result_type
 
template<class T >
void Si::detail::destroy_storage (void *storage) BOOST_NOEXCEPT
 
template<class T >
void Si::detail::move_construct_storage (void *destination, void *source) BOOST_NOEXCEPT
 
template<class T >
void Si::detail::copy_construct_storage (void *destination, void const *source)
 
template<class T >
void Si::detail::move_storage (void *destination, void *source) BOOST_NOEXCEPT
 
template<class T >
void Si::detail::copy_storage (void *destination, void const *source)
 
template<class T >
bool Si::detail::equals (void const *left, void const *right)
 
template<class T >
bool Si::detail::less (void const *left, void const *right)
 
template<class Visitor , class T , class Result >
Result Si::detail::apply_visitor_impl (Visitor &&visitor, void *element)
 
template<class Visitor , class T , class Result >
Result Si::detail::apply_visitor_const_impl (Visitor &&visitor, void const *element)
 
 Si::detail::BOOST_STATIC_ASSERT (are_copyable<>::value)
 
 Si::detail::BOOST_STATIC_ASSERT (are_copyable< int >::value)
 
 Si::detail::BOOST_STATIC_ASSERT ((are_copyable< int, float >::value))
 
template<bool IsCopyable, class... T>
std::ostream & Si::detail::operator<< (std::ostream &out, variant_base< IsCopyable, T... > const &v)
 
 Si::BOOST_STATIC_ASSERT (is_handle< variant< int >>::value)
 
 Si::BOOST_STATIC_ASSERT ((is_handle< variant< int, nothing >>::value))
 
template<class... T>
bool Si::operator!= (variant< T... > const &left, variant< T... > const &right)
 
template<class... T>
bool Si::operator> (variant< T... > const &left, variant< T... > const &right)
 
template<class... T>
bool Si::operator<= (variant< T... > const &left, variant< T... > const &right)
 
template<class... T>
bool Si::operator>= (variant< T... > const &left, variant< T... > const &right)
 
template<class Element , class... T>
boost::optional< Element > Si::try_get (variant< T... > &from)
 
template<class Element , class... T>
Element * Si::try_get_ptr (variant< T... > &from) BOOST_NOEXCEPT
 
template<class Element , class... T>
std::add_const< Element >::type * Si::try_get_ptr (variant< T... > const &from) BOOST_NOEXCEPT
 
template<class Result , class... T, class... Visitors>
Result Si::visit (variant< T... > &variant, Visitors &&...visitors)
 
template<class Result , class... T, class... Visitors>
Result Si::visit (variant< T... > const &variant, Visitors &&...visitors)
 
 BOOST_STATIC_ASSERT (sizeof(Si::variant< boost::uint32_t >)==(2 *sizeof(boost::uint32_t)))
 
 BOOST_STATIC_ASSERT (sizeof(Si::variant< int * >)==(sizeof(boost::uint32_t)+sizeof(int *)))
 
 BOOST_STATIC_ASSERT (sizeof(Si::variant< std::hash< Si::variant< int >>>)==sizeof(boost::uint32_t))
 

Function Documentation

BOOST_STATIC_ASSERT ( sizeof(Si::variant< boost::uint32_t >)  = =(2 *sizeof(boost::uint32_t)))
BOOST_STATIC_ASSERT ( sizeof(Si::variant< int * >)  = =(sizeof(boost::uint32_t)+sizeof(int *)))
BOOST_STATIC_ASSERT ( sizeof(Si::variant< std::hash< Si::variant< int >>>)  = =sizeof(boost::uint32_t))