ModErn Text Analysis
META Enumerates Textual Applications
Classes | Typedefs | Functions | Variables
meta::util Namespace Reference

Shared resources and utilities. More...

Classes

class  bad_optional_access
 Exception thrown when trying to obtain the value of a non-engaged optional. More...
 
class  basic_range
 Implements a range that spans a loop's extension and termination conditions, most useful for iterating over a range of numbers with a range-based for loop. More...
 
class  comparable
 A CRTP base class that allows for inheritance of all comparator operators given that the derived class defines an operator<(). More...
 
class  dense_matrix
 Simple wrapper class for representing a dense matrix laid out in row-major order (that is, its internal representation is a linear array of the rows). More...
 
class  disk_vector
 disk_vector represents a large constant-size vector that does not necessarily fit in memory. More...
 
class  factory
 Generic factory that can be subclassed to create factories for specific types. More...
 
struct  hash_wrapper
 Helper class that allows the wrapped type to be hashed into standard library containers such as unordered_map or unordered_set. More...
 
struct  identifier
 CRTP base template that denotes an identifier. More...
 
class  invertible_map
 This data structure indexes by keys as well as values, allowing constant amortized lookup time by key or value. More...
 
class  multilevel_clonable
 Template class to facilitate polymorphic cloning. More...
 
struct  nullopt_t
 A dummy type for representing a disengaged option<T>. More...
 
struct  numeric
 Empty helper class to denote that something is numeric. More...
 
struct  numerical_identifier
 A CRTP template base that adds numeric functionality to the identifier type. More...
 
class  optional
 A class for representing optional values. More...
 
struct  optional_dummy_t
 A dummy type for optional storage. More...
 
union  optional_storage
 A storage class for the optional<T> class. More...
 
class  persistent_stack
 
class  pimpl
 Class to assist in simple pointer-to-implementation classes. More...
 
class  sparse_vector
 Represents a sparse vector, indexed by type Index and storing values of type Value. More...
 
struct  trivial_init_t
 A tag for trivial initialization of optional storage. More...
 

Typedefs

template<class Base , class Derived >
using clonable = multilevel_clonable< Base, Base, Derived >
 Template alias to facilitate polymorphic cloning. More...
 

Functions

template<class T >
bool operator< (const optional< T > &lhs, const optional< T > &rhs)
 
template<class T >
basic_range< T > range (const T &begin, const T &end)
 Constructs a range based on a beginning and ending value. More...
 
template<class T >
basic_range< T > range (const T &begin, const T &end, const T &step)
 Constructs a range based on a beginning value, and ending value, and a step size. More...
 

Variables

constexpr struct meta::util::trivial_init_t trivial_init
 
constexpr nullopt_t nullopt {nullopt_t::init{}}
 A global nullopt_t constant.
 

Detailed Description

Shared resources and utilities.

Typedef Documentation

template<class Base , class Derived >
using meta::util::clonable = typedef multilevel_clonable<Base, Base, Derived>

Template alias to facilitate polymorphic cloning.

Use in place of an ordinary base class, with first parameter being the base class and the second parameter being the current class (CRTP style).

Function Documentation

template<class T >
basic_range<T> meta::util::range ( const T &  begin,
const T &  end 
)

Constructs a range based on a beginning and ending value.

Parameters
beginThe desired start for the range
endThe desired end for the range
Returns
a new range between begin and end
template<class T >
basic_range<T> meta::util::range ( const T &  begin,
const T &  end,
const T &  step 
)

Constructs a range based on a beginning value, and ending value, and a step size.

Parameters
beginThe desired start for the range
endThe desired end for the range
stepThe desired step size for the range
Returns
a new range between begin and end that increments by step each time