Vcsn  2.2
Be Rational
traits.hh File Reference
#include <memory>
#include <vcsn/misc/type_traits.hh>
Include dependency graph for traits.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  vcsn::detail::context_t_of_impl< ValueSet, typename >
 
struct  vcsn::detail::context_t_of_impl< ValueSet, void_t< typename ValueSet::context_t > >
 
struct  vcsn::detail::context_t_of_impl< std::shared_ptr< ValueSet >, void_t< typename ValueSet::context_t > >
 
struct  vcsn::detail::label_t_of_impl< ValueSet, typename >
 
struct  vcsn::detail::label_t_of_impl< ValueSet, void_t< typename ValueSet::label_t > >
 
struct  vcsn::detail::label_t_of_impl< std::shared_ptr< ValueSet >, void_t< typename ValueSet::label_t > >
 
struct  vcsn::detail::labelset_t_of_impl< ValueSet, typename >
 
struct  vcsn::detail::labelset_t_of_impl< ValueSet, void_t< typename ValueSet::labelset_t > >
 
struct  vcsn::detail::labelset_t_of_impl< std::shared_ptr< ValueSet >, void_t< typename ValueSet::labelset_t > >
 
struct  vcsn::detail::state_t_of_impl< ValueSet, typename >
 
struct  vcsn::detail::state_t_of_impl< ValueSet, void_t< typename ValueSet::state_t > >
 
struct  vcsn::detail::state_t_of_impl< std::shared_ptr< ValueSet >, void_t< typename ValueSet::state_t > >
 
struct  vcsn::detail::transition_t_of_impl< ValueSet, typename >
 
struct  vcsn::detail::transition_t_of_impl< ValueSet, void_t< typename ValueSet::transition_t > >
 
struct  vcsn::detail::transition_t_of_impl< std::shared_ptr< ValueSet >, void_t< typename ValueSet::transition_t > >
 
struct  vcsn::detail::weight_t_of_impl< ValueSet, typename >
 
struct  vcsn::detail::weight_t_of_impl< ValueSet, void_t< typename ValueSet::weight_t > >
 
struct  vcsn::detail::weight_t_of_impl< std::shared_ptr< ValueSet >, void_t< typename ValueSet::weight_t > >
 
struct  vcsn::detail::weightset_t_of_impl< ValueSet, typename >
 
struct  vcsn::detail::weightset_t_of_impl< ValueSet, void_t< typename ValueSet::weightset_t > >
 
struct  vcsn::detail::weightset_t_of_impl< std::shared_ptr< ValueSet >, void_t< typename ValueSet::weightset_t > >
 

Namespaces

 vcsn
 
 vcsn::detail
 

Macros

#define DEFINE(Type)
 Extract various ValueSets/Value types from objects, or pointers to objects. More...
 

Typedefs

template<typename T >
using vcsn::base_t = std::remove_cv_t< std::remove_reference_t< T >>
 T without reference or const/volatile qualifiers. More...
 
template<typename ValueSet >
using vcsn::context_t_of = typename detail::context_t_of_impl< base_t< ValueSet >>::type
 
template<typename ValueSet >
using vcsn::label_t_of = typename detail::label_t_of_impl< base_t< ValueSet >>::type
 
template<typename ValueSet >
using vcsn::labelset_t_of = typename detail::labelset_t_of_impl< base_t< ValueSet >>::type
 
template<typename ValueSet >
using vcsn::state_t_of = typename detail::state_t_of_impl< base_t< ValueSet >>::type
 
template<typename ValueSet >
using vcsn::transition_t_of = typename detail::transition_t_of_impl< base_t< ValueSet >>::type
 
template<typename ValueSet >
using vcsn::weight_t_of = typename detail::weight_t_of_impl< base_t< ValueSet >>::type
 
template<typename ValueSet >
using vcsn::weightset_t_of = typename detail::weightset_t_of_impl< base_t< ValueSet >>::type
 
template<typename Aut , typename Context = context_t_of<Aut>>
using vcsn::fresh_automaton_t_of = typename Aut::element_type::template fresh_automaton_t< Context >
 Given an automaton type, the type of its copies. More...
 
template<typename ValueSet >
using vcsn::letter_t_of = typename labelset_t_of< base_t< ValueSet >>::letter_t
 
template<typename ValueSet >
using vcsn::word_t_of = typename labelset_t_of< base_t< ValueSet >>::word_t
 

Macro Definition Documentation

#define DEFINE (   Type)
Value:
namespace detail \
{ \
template <typename ValueSet, typename = void_t<>> \
struct Type ## _of_impl; \
\
template <typename ValueSet> \
struct Type ## _of_impl<ValueSet, \
void_t<typename ValueSet::Type>> \
{ \
using type = typename ValueSet::Type; \
}; \
\
template <typename ValueSet> \
struct Type ## _of_impl<std::shared_ptr<ValueSet>, \
void_t<typename ValueSet::Type>> \
{ \
using type = typename ValueSet::Type; \
}; \
} \
\
template <typename ValueSet> \
using Type ## _of \
= typename detail::Type ## _of_impl<base_t<ValueSet>>::type

Extract various ValueSets/Value types from objects, or pointers to objects.

Example of valid uses:

labelset_t_of<mutable_automaton_impl> // a class labelset_t_of<mutable_automaton> // a shared_ptr

SFINAE compliant.

Definition at line 28 of file traits.hh.