Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
ustl Namespace Reference

The ustl namespace contains all ustl classes and algorithms. More...

Namespaces

 tm
 Template metaprogramming tools.
 

Classes

struct  __add_lvalue_reference
 
struct  __add_lvalue_reference< T, true >
 
struct  __add_rvalue_reference
 
struct  __add_rvalue_reference< T, true >
 
struct  __decay
 
struct  __decay< T, false, false >
 
struct  __decay< T, false, true >
 
struct  __decay< T, true, false >
 
class  __is_convertible
 
class  __is_convertible< F, T, false >
 
struct  __is_member_function_pointer< R(T::*)(...)>
 
struct  __is_member_function_pointer< R(T::*)(Args...)>
 
struct  __is_member_function_pointer< R(T::*)(Args...,...)>
 
struct  __is_member_function_pointer< R(T::*)(void)>
 
struct  __is_member_pointer< U T::* >
 
struct  __is_pointer
 
struct  __is_pointer< T * >
 
struct  __is_referenceable< R(Args...)>
 
struct  __is_referenceable< R(Args......)>
 
class  _long4grain
 
struct  add_const
 
struct  add_const< const T >
 
struct  add_cv
 
struct  add_lvalue_reference
 
struct  add_pointer
 
struct  add_pointer< T * >
 
struct  add_rvalue_reference
 
struct  add_volatile
 
struct  add_volatile< volatile T >
 
struct  aligned_storage
 
struct  alignment_of
 
class  array
 A fixed-size array of N Ts. More...
 
class  auto_ptr
 A smart pointer. More...
 
class  back_insert_iterator
 Calls push_back on bound container for each assignment. More...
 
class  bad_cast
 Thrown to indicate a bad dynamic_cast usage. More...
 
class  bad_typeid
 
class  binary_compose
 Chains two unary functions through a binary function. More...
 
struct  binary_function
 Result f (Arg1, Arg2) function abstract interface. More...
 
class  binder1st
 Converts a binary function to a unary function by binding a constant value to the first argument. Use the bind1st accessor to create this object. More...
 
class  binder2nd
 Converts a binary function to a unary function by binding a constant value to the second argument. Use the bind2nd accessor to create this object. More...
 
class  bitset
 bitset is a fixed-size block of memory with addressable bits. More...
 
class  CBacktrace
 Stores the backtrace from the point of construction. More...
 
class  cmemlink
 A read-only pointer to a sized block of memory. More...
 
struct  conditional
 Selects type = flag ? T : U. More...
 
struct  conditional< false, T, U >
 
struct  decay
 
class  domain_error
 Reports domain errors ("domain" is in the mathematical sense) More...
 
struct  enable_if
 
struct  enable_if< true, T >
 
class  error_message
 
class  exception
 Base class for exceptions, equivalent to std::exception. More...
 
struct  extent
 
struct  extent< T[], I >
 
struct  extent< T[N], I >
 
class  file_exception
 File-related exceptions. More...
 
class  fstream
 Implements file operations. More...
 
class  ifstream
 A string stream that reads from an fd. Implements cin. More...
 
class  index_iterate
 Allows iteration through an index container. More...
 
class  insert_iterator
 Calls insert on bound container for each assignment. More...
 
struct  integral_constant
 true or false templatized constant for metaprogramming More...
 
struct  integral_object_reader
 
struct  integral_object_stream_size
 
struct  integral_object_writer
 
struct  integral_text_object_reader
 
struct  integral_text_object_writer
 
struct  integral_text_object_writer< T * >
 
class  invalid_argument
 Reports an invalid argument to a function. More...
 
class  ios
 
class  ios_base
 Defines types and constants used by all stream classes. More...
 
struct  is_array< T[]>
 
struct  is_array< T[N]>
 
struct  is_base_of
 
struct  is_base_of< T, T >
 
struct  is_base_of< void, T >
 
struct  is_const< T const >
 
struct  is_convertible
 
struct  is_function< R(Args...) const >
 
struct  is_function< R(Args...) const & >
 
struct  is_function< R(Args...) const && >
 
struct  is_function< R(Args...) const volatile & >
 
struct  is_function< R(Args...) const volatile && >
 
struct  is_function< R(Args...) const volatile >
 
struct  is_function< R(Args...) volatile & >
 
struct  is_function< R(Args...) volatile && >
 
struct  is_function< R(Args...) volatile >
 
struct  is_function< R(Args...)& >
 
struct  is_function< R(Args...)&& >
 
struct  is_function< R(Args...)>
 
struct  is_function< R(Args......) const >
 
struct  is_function< R(Args......) const & >
 
struct  is_function< R(Args......) const && >
 
struct  is_function< R(Args......) const volatile & >
 
struct  is_function< R(Args......) const volatile && >
 
struct  is_function< R(Args......) const volatile >
 
struct  is_function< R(Args......) volatile & >
 
struct  is_function< R(Args......) volatile && >
 
struct  is_function< R(Args......) volatile >
 
struct  is_function< R(Args......)& >
 
struct  is_function< R(Args......)&& >
 
struct  is_function< R(Args......)>
 
struct  is_lvalue_reference< T & >
 
struct  is_pointer
 
struct  is_rvalue_reference< T && >
 
struct  is_same
 
struct  is_same< T, T >
 
struct  is_volatile< T volatile >
 
class  istream
 Helper class to read packed binary streams. More...
 
class  istream_iterator
 An iterator over an istream to use with uSTL algorithms. More...
 
class  istringstream
 A stream that reads textual data from a memory block. More...
 
struct  iterator_traits
 Contains the type traits of Iterator. More...
 
class  length_error
 Reports when an object exceeds its allowed size. More...
 
class  libc_exception
 Thrown when a libc function returns an error. More...
 
class  list
 Linked list, defined as an alias to vector. More...
 
class  logic_error
 Logic errors represent problems in the internal logic of the program. More...
 
struct  make_signed
 
struct  make_signed< char >
 
struct  make_signed< unsigned char >
 
struct  make_signed< unsigned int >
 
struct  make_signed< unsigned long >
 
struct  make_signed< unsigned long long >
 
struct  make_signed< unsigned short >
 
struct  make_unsigned
 
struct  make_unsigned< char >
 
struct  make_unsigned< int >
 
struct  make_unsigned< long >
 
struct  make_unsigned< long long >
 
struct  make_unsigned< short >
 
struct  make_unsigned< signed char >
 
class  map
 A sorted associative container of pair<K,V> More...
 
class  matrix
 A two-dimensional array of NX*NY elements of type T. More...
 
class  memblock
 Allocated memory block. More...
 
class  memlink
 Wrapper for pointer to block with size. More...
 
class  multimap
 A sorted associative container that may container multiple entries for each key. More...
 
class  multiset
 Multiple sorted container. Unlike set, it may contain multiple copies of each element. More...
 
class  numeric_limits
 Defines numeric limits for a type. More...
 
struct  numeric_limits< tuple< N, T > >
 
struct  object_reader
 
struct  object_stream_size
 For partial specialization of stream_size_of for objects. More...
 
struct  object_stream_size< pair< T1, T2 > >
 Returns the written size of the object. More...
 
struct  object_text_reader
 
struct  object_text_reader< string >
 
struct  object_text_writer
 
struct  object_text_writer< string >
 
struct  object_writer
 
class  ofstream
 A string stream that writes to an fd. Implements cout and cerr. More...
 
class  ostream
 Helper class to write packed binary streams. More...
 
class  ostream_iterator
 An iterator over an ostream to use with uSTL algorithms. More...
 
class  ostringstream
 This stream writes textual data into a memory block. More...
 
class  out_of_range
 Reports arguments with values out of allowed range. More...
 
class  overflow_error
 Reports arithmetic overflow. More...
 
class  pair
 Container for two values. More...
 
struct  pair_compare_first
 
struct  pair_compare_first_key
 
class  pointer_to_binary_function
 Wrapper object for binary function pointers. Use the ptr_fun accessor to create this object. More...
 
class  pointer_to_unary_function
 Wrapper object for unary function pointers. Use the ptr_fun accessor to create this object. More...
 
class  priority_queue
 Sorted queue adapter to uSTL containers. More...
 
struct  project1st
 Selects and returns the first argument. More...
 
struct  project2nd
 Selects and returns the second argument. More...
 
class  queue
 Queue adapter to uSTL containers. More...
 
class  range_error
 Reports data that does not fall within the permitted range. More...
 
struct  rank
 
struct  rank< T[]>
 
struct  rank< T[N]>
 
struct  remove_all_extents
 
struct  remove_all_extents< T[]>
 
struct  remove_all_extents< T[N]>
 
struct  remove_const
 
struct  remove_const< T const >
 
struct  remove_cv
 
struct  remove_extent
 
struct  remove_extent< T[]>
 
struct  remove_extent< T[N]>
 
struct  remove_pointer
 
struct  remove_pointer< T * >
 
struct  remove_reference
 
struct  remove_reference< T & >
 
struct  remove_reference< T && >
 
struct  remove_volatile
 
struct  remove_volatile< T volatile >
 
class  reverse_iterator
 Wraps Iterator to behave in an exactly opposite manner. More...
 
class  runtime_error
 Reports errors that are dependent on the data being processed. More...
 
struct  Sdtorsr
 
struct  Sdtorsr< T, true >
 
struct  select1st
 Takes a pair and returns pair.first This is an extension, available in uSTL and the SGI STL. More...
 
struct  select2nd
 Takes a pair and returns pair.second This is an extension, available in uSTL and the SGI STL. More...
 
class  set
 Unique sorted container. Sorted vector with all values unique. More...
 
class  stack
 Stack adapter to uSTL containers. More...
 
class  stream_bounds_exception
 Stream bounds checking. More...
 
class  string
 STL basic_string<char> equivalent. More...
 
struct  t_if
 Selects bool = flag ? T : U. More...
 
struct  t_if< false, T, U >
 
class  tuple
 A fixed-size array of N Ts. More...
 
class  unary_compose
 Chains two unary functions together. More...
 
struct  unary_function
 Result f (Arg) function abstract interface. More...
 
class  unary_negate
 Wraps a unary function to return its logical negative. Use the unary_negator accessor to create this object. More...
 
class  underflow_error
 Reports arithmetic underflow. More...
 
struct  underlying_type
 
class  unique_ptr
 A smart pointer. Calls delete in the destructor; assignment transfers ownership. This class does not work with void pointers due to the absence of the required dereference operator. More...
 
class  unique_ptr< T[]>
 
class  utf8in_iterator
 An iterator adaptor to character containers for reading UTF-8 encoded text. More...
 
class  utf8out_iterator
 An iterator adaptor to character containers for writing UTF-8 encoded text. More...
 
class  vector
 STL vector equivalent. More...
 
struct  void_function
 void-returning function abstract interface. More...
 

Typedefs

typedef istream_iterator< utf8subchar_tistream_iterator_for_utf8
 
typedef utf8in_iterator< istream_iterator_for_utf8utf8istream_iterator
 
typedef ostream_iterator< utf8subchar_tostream_iterator_for_utf8
 
typedef utf8out_iterator< ostream_iterator_for_utf8utf8ostream_iterator
 
typedef uint32_t bitset_value_type
 
typedef uint32_t xfmt_t
 
typedef std::bad_alloc bad_alloc
 
typedef uint8_t utf8subchar_t
 Type for the encoding subcharacters.
 
using true_type = integral_constant< bool, true >
 
using false_type = integral_constant< bool, false >
 
template<bool flag, typename T , typename U >
using conditional_t = typename conditional< flag, T, U >::type
 
template<bool flag, typename T >
using enable_if_t = typename enable_if< flag, T >::type
 
template<typename T >
using remove_const_t = typename remove_const< T >::type
 
template<typename T >
using remove_volatile_t = typename remove_volatile< T >::type
 
template<typename T >
using remove_cv_t = typename remove_cv< T >::type
 
template<typename T >
using add_const_t = typename add_const< T >::type
 
template<typename T >
using add_volatile_t = typename add_volatile< T >::type
 
template<typename T >
using add_cv_t = typename add_cv< T >::type
 
template<typename T >
using remove_reference_t = typename remove_reference< T >::type
 
template<typename T >
using remove_pointer_t = typename remove_pointer< T >::type
 
template<typename T >
using add_pointer_t = typename add_pointer< T >::type
 
template<typename T >
using remove_extent_t = typename remove_extent< T >::type
 
template<typename T >
using remove_all_extents_t = typename remove_all_extents< T >::type
 
template<typename T >
using underlying_type_t = typename underlying_type< T >::type
 
template<typename T >
using make_signed_t = typename make_signed< T >::type
 
template<typename T >
using make_unsigned_t = typename make_unsigned< T >::type
 
template<typename T >
using add_lvalue_reference_t = typename add_lvalue_reference< T >::type
 
template<typename T >
using add_rvalue_reference_t = typename add_rvalue_reference< T >::type
 
template<typename T >
using decay_t = typename decay< T >::type
 

Enumerations

enum  {
  xfmt_Exception,
  xfmt_BadAlloc,
  xfmt_LibcException = 12,
  xfmt_FileException = 13,
  xfmt_StreamBoundsException = 14
}
 
enum  {
  xfmt_ErrorMessage = 2,
  xfmt_LogicError = xfmt_ErrorMessage,
  xfmt_RuntimeError = xfmt_ErrorMessage
}
 

Functions

template<typename T , typename Stream >
streamsize required_stream_size (T, const Stream &)
 
template<typename T >
streamsize required_stream_size (T v, const istream &)
 
template<typename Stream >
bool stream_at_eof (const Stream &stm)
 
template<>
bool stream_at_eof (const istream &)
 
template<typename T >
istreamoperator>> (istream &is, T &v)
 
template<typename T >
istreamoperator>> (istream &is, const T &v)
 
utf8istream_iterator utf8in (istream &is)
 Returns a UTF-8 adaptor reading from is.
 
utf8ostream_iterator utf8out (ostream &os)
 Returns a UTF-8 adaptor writing to os.
 
template<typename T >
ostreamoperator<< (ostream &os, const T &v)
 
template<typename RealT , typename CastT >
void _cast_read (istringstream &is, RealT &v)
 Reads one type as another.
 
istringstreamgetline (istringstream &is, string &s)
 Reads a line of text from is into s.
 
template<typename T >
istringstreamoperator>> (istringstream &is, T &v)
 
template<typename T >
const char * printf_typestring (const T &)
 
template<typename T >
ostringstreamoperator<< (ostringstream &os, const T &v)
 
ostringstreamoperator<< (ostringstream &os, const char *v)
 
ostringstreamoperator<< (ostringstream &os, char *v)
 
template<typename T >
streamsize stream_size_of (const T &v)
 Returns the size of the given object. Overloads for standard types are available.
 
template<typename T >
size_t stream_align_of (const T &)
 Returns the recommended stream alignment for type T. Override with ALIGNOF. Because this is occasionally called with a null value, do not access the argument!
 
template<typename ForwardIterator1 , typename ForwardIterator2 >
ForwardIterator2 swap_ranges (ForwardIterator1 first, ForwardIterator2 last, ForwardIterator2 result)
 
template<typename InputIterator , typename EqualityComparable >
InputIterator find (InputIterator first, InputIterator last, const EqualityComparable &value)
 
template<typename ForwardIterator >
ForwardIterator adjacent_find (ForwardIterator first, ForwardIterator last)
 
template<typename InputIterator >
pair< InputIterator, InputIterator > mismatch (InputIterator first1, InputIterator last1, InputIterator first2)
 
template<typename InputIterator >
bool equal (InputIterator first1, InputIterator last1, InputIterator first2)
 Returns true if two ranges are equal. This is an extension, present in uSTL and SGI STL.
 
template<typename InputIterator , typename EqualityComparable >
size_t count (InputIterator first, InputIterator last, const EqualityComparable &value)
 
template<typename InputIterator , typename OutputIterator , typename UnaryFunction >
OutputIterator transform (InputIterator first, InputIterator last, OutputIterator result, UnaryFunction op)
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename BinaryFunction >
OutputIterator transform (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator result, BinaryFunction op)
 
template<typename ForwardIterator , typename T >
void replace (ForwardIterator first, ForwardIterator last, const T &old_value, const T &new_value)
 
template<typename InputIterator , typename OutputIterator , typename T >
OutputIterator replace_copy (InputIterator first, InputIterator last, OutputIterator result, const T &old_value, const T &new_value)
 
template<typename ForwardIterator , typename Generator >
void generate (ForwardIterator first, ForwardIterator last, Generator gen)
 
template<typename OutputIterator , typename Generator >
OutputIterator generate_n (OutputIterator first, size_t n, Generator gen)
 
template<typename BidirectionalIterator >
void reverse (BidirectionalIterator first, BidirectionalIterator last)
 Reverse reverses a range. That is: for every i such that 0 <= i <= (last - first) / 2), it exchanges *(first + i) and *(last - (i + 1)).
 
template<typename BidirectionalIterator , typename OutputIterator >
OutputIterator reverse_copy (BidirectionalIterator first, BidirectionalIterator last, OutputIterator result)
 Reverses [first,last) and writes it to output.
 
template<typename ForwardIterator >
ForwardIterator rotate (ForwardIterator first, ForwardIterator middle, ForwardIterator last)
 Exchanges ranges [first, middle) and [middle, last)
 
template<typename T >
T * rotate (T *first, T *middle, T *last)
 Specialization for pointers, which can be treated identically.
 
template<typename ForwardIterator , typename OutputIterator >
OutputIterator rotate_copy (ForwardIterator first, ForwardIterator middle, ForwardIterator last, OutputIterator result)
 Exchanges ranges [first, middle) and [middle, last) into result.
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
OutputIterator merge (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result)
 Combines two sorted ranges.
 
template<typename InputIterator >
void inplace_merge (InputIterator first, InputIterator middle, InputIterator last)
 
template<typename InputIterator , typename OutputIterator , typename T >
OutputIterator remove_copy (InputIterator first, InputIterator last, OutputIterator result, const T &value)
 
template<typename InputIterator , typename OutputIterator , typename RInputIterator >
OutputIterator remove_copy (InputIterator first, InputIterator last, OutputIterator result, RInputIterator rfirst, RInputIterator rlast)
 
template<typename ForwardIterator , typename T >
ForwardIterator remove (ForwardIterator first, ForwardIterator last, const T &value)
 
template<typename InputIterator , typename OutputIterator >
OutputIterator unique_copy (InputIterator first, InputIterator last, OutputIterator result)
 
template<typename ForwardIterator >
ForwardIterator unique (ForwardIterator first, ForwardIterator last)
 
template<typename ForwardIterator , typename LessThanComparable >
ForwardIterator lower_bound (ForwardIterator first, ForwardIterator last, const LessThanComparable &value)
 
template<typename ForwardIterator , typename LessThanComparable >
bool binary_search (ForwardIterator first, ForwardIterator last, const LessThanComparable &value)
 
template<typename ForwardIterator , typename LessThanComparable >
ForwardIterator upper_bound (ForwardIterator first, ForwardIterator last, const LessThanComparable &value)
 
template<typename ForwardIterator , typename LessThanComparable >
pair< ForwardIterator, ForwardIterator > equal_range (ForwardIterator first, ForwardIterator last, const LessThanComparable &value)
 
template<typename RandomAccessIterator >
void random_shuffle (RandomAccessIterator first, RandomAccessIterator last)
 
template<typename ConstPointer , typename Compare >
int qsort_adapter (const void *p1, const void *p2)
 Generic compare function adaptor to pass to qsort.
 
template<typename RandomAccessIterator , typename Compare >
void sort (RandomAccessIterator first, RandomAccessIterator last, Compare)
 
template<typename RandomAccessIterator >
void sort (RandomAccessIterator first, RandomAccessIterator last)
 
template<typename RandomAccessIterator , typename Compare >
void stable_sort (RandomAccessIterator first, RandomAccessIterator last, Compare comp)
 
template<typename RandomAccessIterator >
void stable_sort (RandomAccessIterator first, RandomAccessIterator last)
 
template<typename ForwardIterator1 , typename ForwardIterator2 >
ForwardIterator1 search (ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2)
 Searches for the first subsequence [first2,last2) in [first1,last1)
 
template<typename ForwardIterator1 , typename ForwardIterator2 >
ForwardIterator1 find_end (ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2)
 Searches for the last subsequence [first2,last2) in [first1,last1)
 
template<typename Iterator , typename T >
Iterator search_n (Iterator first, Iterator last, size_t count, const T &value)
 Searches for the first occurence of count values in [first, last)
 
template<typename InputIterator , typename ForwardIterator >
InputIterator find_first_of (InputIterator first1, InputIterator last1, ForwardIterator first2, ForwardIterator last2)
 Searches [first1,last1) for the first occurrence of an element from [first2,last2)
 
template<typename InputIterator1 , typename InputIterator2 >
bool includes (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2)
 Returns true if [first2,last2) is a subset of [first1,last1)
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
OutputIterator set_union (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result)
 Merges [first1,last1) with [first2,last2) More...
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
OutputIterator set_intersection (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result)
 Creates a set containing elements shared by the given ranges.
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
OutputIterator set_difference (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result)
 Removes from [first1,last1) elements present in [first2,last2)
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator >
OutputIterator set_symmetric_difference (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result)
 Performs union of sets A-B and B-A.
 
template<typename ForwardIterator >
bool is_sorted (ForwardIterator first, ForwardIterator last)
 Returns true if the given range is sorted.
 
template<typename InputIterator1 , typename InputIterator2 >
bool lexicographical_compare (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2)
 Compares two given containers like strcmp compares strings.
 
template<typename BidirectionalIterator >
bool next_permutation (BidirectionalIterator first, BidirectionalIterator last)
 Creates the next lexicographical permutation of [first,last). Returns false if no further permutations can be created.
 
template<typename BidirectionalIterator >
bool prev_permutation (BidirectionalIterator first, BidirectionalIterator last)
 Creates the previous lexicographical permutation of [first,last). Returns false if no further permutations can be created.
 
template<typename ForwardIterator >
ForwardIterator max_element (ForwardIterator first, ForwardIterator last)
 Returns iterator to the max element in [first,last)
 
template<typename ForwardIterator >
ForwardIterator min_element (ForwardIterator first, ForwardIterator last)
 Returns iterator to the min element in [first,last)
 
template<typename RandomAccessIterator >
void partial_sort (RandomAccessIterator first, RandomAccessIterator middle, RandomAccessIterator last)
 Makes [first,middle) a part of the sorted array. Contents of [middle,last) is undefined. This implementation just calls stable_sort.
 
template<typename RandomAccessIterator >
void nth_element (RandomAccessIterator first, RandomAccessIterator nth, RandomAccessIterator last)
 Puts nth element into its sorted position. In this implementation, the entire array is sorted. I can't think of any use for it where the time gained would be useful.
 
template<typename InputIterator , typename RandomAccessIterator >
RandomAccessIterator partial_sort_copy (InputIterator first, InputIterator last, RandomAccessIterator result_first, RandomAccessIterator result_last)
 Like partial_sort, but outputs to [result_first,result_last)
 
template<>
void build_block (uint8_t v)
 
template<>
void build_block (uint16_t v)
 
template<>
void build_block (uint32_t v)
 
void fill_n8_fast (uint8_t *dest, size_t count, uint8_t v) noexcept
 
void fill_n16_fast (uint16_t *dest, size_t count, uint16_t v) noexcept
 
void fill_n32_fast (uint32_t *dest, size_t count, uint32_t v) noexcept
 
void rotate_fast (void *first, void *middle, void *last) noexcept
 Exchanges ranges [first, middle) and [middle, last)
 
size_t popcount (uint32_t v) noexcept
 
size_t popcount (uint64_t v) noexcept
 Returns the number of 1s in v in binary.
 
template<typename T >
constexpr tm::RemoveReference< T >::Result && move (T &&v) noexcept
 
template<typename T >
constexpr T && forward (typename tm::RemoveReference< T >::Result &v) noexcept
 
template<typename T >
constexpr T && forward (typename tm::RemoveReference< T >::Result &&v) noexcept
 
template<typename Assignable >
void swap (Assignable &a, Assignable &b)
 
template<typename Iterator >
void iter_swap (Iterator a, Iterator b)
 
template<typename InputIterator , typename OutputIterator >
OutputIterator copy (InputIterator first, InputIterator last, OutputIterator result)
 
template<typename InputIterator , typename OutputIterator >
OutputIterator copy_n (InputIterator first, size_t count, OutputIterator result)
 
template<typename InputIterator , typename OutputIterator >
OutputIterator copy_backward (InputIterator first, InputIterator last, OutputIterator result)
 Copy copies elements from the range (last, first] to result.Copies elements starting at last, decrementing both last and result.
 
template<typename InputIterator , typename UnaryFunction >
UnaryFunction for_each (InputIterator first, InputIterator last, UnaryFunction f)
 
template<typename ForwardIterator , typename T >
void fill (ForwardIterator first, ForwardIterator last, const T &value)
 
template<typename OutputIterator , typename T >
OutputIterator fill_n (OutputIterator first, size_t count, const T &value)
 
void copy_n_fast (const void *src, size_t count, void *dest) noexcept
 
void copy_backward_fast (const void *first, const void *last, void *result) noexcept
 
template<typename T >
T * unrolled_copy (const T *first, size_t count, T *result)
 
template<>
uint8_t * copy_backward (const uint8_t *first, const uint8_t *last, uint8_t *result)
 
template<typename T >
T * unrolled_fill (T *result, size_t count, T value)
 
template<>
uint8_t * unrolled_fill (uint8_t *result, size_t count, uint8_t value)
 
template<>
uint16_t * unrolled_fill (uint16_t *result, size_t count, uint16_t value)
 
template<>
uint32_t * unrolled_fill (uint32_t *result, size_t count, uint32_t value)
 
template<>
float * unrolled_fill (float *result, size_t count, float value)
 
template<typename T1 , size_t N, typename T2 >
bool operator== (const array< T1, N > &t1, const array< T2, N > &t2)
 
template<typename T1 , size_t N, typename T2 >
bool operator< (const array< T1, N > &t1, const array< T2, N > &t2)
 
template<typename T1 , size_t N, typename T2 >
const array< T1, N > & operator+= (array< T1, N > &t1, const array< T2, N > &t2)
 
template<typename T1 , size_t N, typename T2 >
const array< T1, N > & operator-= (array< T1, N > &t1, const array< T2, N > &t2)
 
template<typename T1 , size_t N, typename T2 >
const array< T1, N > & operator*= (array< T1, N > &t1, const array< T2, N > &t2)
 
template<typename T1 , size_t N, typename T2 >
const array< T1, N > & operator/= (array< T1, N > &t1, const array< T2, N > &t2)
 
template<typename T1 , size_t N, typename T2 >
const array< T1, N > operator+ (const array< T1, N > &t1, const array< T2, N > &t2)
 
template<typename T1 , size_t N, typename T2 >
const array< T1, N > operator- (const array< T1, N > &t1, const array< T2, N > &t2)
 
template<typename T1 , size_t N, typename T2 >
const array< T1, N > operator* (const array< T1, N > &t1, const array< T2, N > &t2)
 
template<typename T1 , size_t N, typename T2 >
const array< T1, N > operator/ (const array< T1, N > &t1, const array< T2, N > &t2)
 
void convert_to_bitstring (const bitset_value_type *v, size_t n, string &buf) noexcept
 
void convert_from_bitstring (const string &buf, bitset_value_type *v, size_t n) noexcept
 Copies bits from buf as MSB "1011001..." LSB into v of size n.
 
template<typename Container , typename OutputIterator >
OutputIterator copy (const Container &ctr, OutputIterator result)
 
template<typename Container , typename OutputIterator , typename Predicate >
OutputIterator copy_if (Container &ctr, OutputIterator result, Predicate pred)
 
template<typename Container , typename UnaryFunction >
UnaryFunction for_each (Container &ctr, UnaryFunction f)
 
template<typename Container , typename UnaryFunction >
UnaryFunction for_each (const Container &ctr, UnaryFunction f)
 
template<typename Container , typename EqualityComparable >
Container::const_iterator find (const Container &ctr, const EqualityComparable &value)
 
template<typename Container , typename EqualityComparable >
Container::iterator find (Container &ctr, const EqualityComparable &value)
 
template<typename Container , typename Predicate >
Container::const_iterator find_if (const Container &ctr, Predicate pred)
 
template<typename Container , typename Predicate >
Container::iterator find_if (Container &ctr, Predicate pred)
 
template<typename Container , typename EqualityComparable >
size_t count (const Container &ctr, const EqualityComparable &value)
 
template<typename Container , typename Predicate >
size_t count_if (const Container &ctr, Predicate pred)
 
template<typename Container , typename UnaryFunction >
void transform (Container &ctr, UnaryFunction op)
 
template<typename Container , typename OutputIterator , typename UnaryFunction >
OutputIterator transform (Container &ctr, OutputIterator result, UnaryFunction op)
 
template<typename Container , typename InputIterator , typename OutputIterator , typename BinaryFunction >
OutputIterator transform (Container &ctr, InputIterator first, OutputIterator result, BinaryFunction op)
 
template<typename Container , typename T >
void replace (Container &ctr, const T &old_value, const T &new_value)
 
template<typename Container , typename Predicate , typename T >
void replace_if (Container &ctr, Predicate pred, const T &new_value)
 
template<typename Container , typename OutputIterator , typename T >
OutputIterator replace_copy (const Container &ctr, OutputIterator result, const T &old_value, const T &new_value)
 
template<typename Container , typename OutputIterator , typename Predicate , typename T >
OutputIterator replace_copy_if (const Container &ctr, OutputIterator result, Predicate pred, const T &new_value)
 
template<typename Container , typename T >
void fill (Container &ctr, const T &value)
 
template<typename Container , typename Generator >
void generate (Container &ctr, Generator gen)
 
template<typename Container >
void random_shuffle (Container &ctr)
 
template<typename Container , typename OutputIterator , typename T >
OutputIterator remove_copy (const Container &ctr, OutputIterator result, const T &value)
 
template<typename Container , typename OutputIterator , typename Predicate >
OutputIterator remove_copy_if (const Container &ctr, OutputIterator result, Predicate pred)
 
template<typename Container , typename T >
void remove (Container &ctr, const T &value)
 
template<typename Container , typename ForwardIterator >
void remove (Container &ctr, ForwardIterator rfirst, ForwardIterator rlast)
 
template<typename Container , typename Predicate >
void remove_if (Container &ctr, Predicate pred)
 
template<typename Container , typename OutputIterator >
OutputIterator unique_copy (const Container &ctr, OutputIterator result)
 
template<typename Container >
void unique (Container &ctr)
 
template<typename Container , typename BinaryPredicate >
void unique (Container &ctr, BinaryPredicate binary_pred)
 
template<typename Container >
void reverse (Container &ctr)
 
template<typename Container >
void rotate (Container &ctr, off_t offset)
 
template<typename Container , typename LessThanComparable >
Container::const_iterator lower_bound (const Container &ctr, const LessThanComparable &value)
 
template<typename Container , typename LessThanComparable >
Container::iterator lower_bound (Container &ctr, const LessThanComparable &value)
 
template<typename Container , typename LessThanComparable >
Container::const_iterator upper_bound (const Container &ctr, const LessThanComparable &value)
 
template<typename Container , typename LessThanComparable >
Container::iterator upper_bound (Container &ctr, const LessThanComparable &value)
 
template<typename Container >
bool binary_search (const Container &ctr, const typename Container::value_type &value)
 
template<typename Container >
bool binary_search (Container &ctr, const typename Container::value_type &value)
 
template<typename Container , typename LessThanComparable >
pair< typename Container::const_iterator, typename Container::const_iterator > equal_range (const Container &ctr, const LessThanComparable &value)
 
template<typename Container , typename LessThanComparable >
pair< typename Container::iterator, typename Container::iterator > equal_range (Container &ctr, const LessThanComparable &value)
 
template<typename Container >
void sort (Container &ctr)
 
template<typename Container , typename Compare >
void sort (Container &ctr, Compare comp)
 
template<typename Container >
void stable_sort (Container &ctr)
 
template<typename Container , typename Compare >
void stable_sort (Container &ctr, Compare comp)
 
template<typename Container >
istreamnr_container_read (istream &is, Container &v)
 Reads fixed size container v from stream is.
 
template<typename Container >
ostreamnr_container_write (ostream &os, const Container &v)
 Writes fixed size container v into stream os.
 
template<typename Container >
size_t nr_container_stream_size (const Container &v)
 Computes the stream size of a fixed size standard container.
 
template<typename Container >
istreamcontainer_read (istream &is, Container &v)
 Reads container v from stream is.
 
template<typename Container >
ostreamcontainer_write (ostream &os, const Container &v)
 Writes the vector to stream os.
 
template<typename Container >
size_t container_stream_size (const Container &v)
 Computes the stream size of a standard container.
 
template<typename T >
ostringstreamcontainer_element_text_write (ostringstream &os, const T &v)
 Writes element v into stream os as text. Specialize to custom print elements.
 
template<typename Container >
ostringstreamcontainer_text_write (ostringstream &os, const Container &v)
 Writes container v into stream os as text.
 
const char * demangle_type_name (char *buf, size_t bufSize, size_t *pdmSize) noexcept
 Uses C++ ABI call, if available to demangle the contents of buf. More...
 
template<typename Arg , typename Result >
pointer_to_unary_function< Arg, Result > ptr_fun (Result(*pfn)(Arg))
 
template<typename Arg1 , typename Arg2 , typename Result >
pointer_to_binary_function< Arg1, Arg2, Result > ptr_fun (Result(*pfn)(Arg1, Arg2))
 
template<class UnaryFunction >
unary_negate< UnaryFunction > unary_negator (UnaryFunction pfn)
 
template<typename BinaryFunction >
binder1st< BinaryFunction > bind1st (BinaryFunction pfn, typename BinaryFunction::first_argument_type v)
 
template<typename BinaryFunction >
binder2nd< BinaryFunction > bind2nd (BinaryFunction pfn, typename BinaryFunction::second_argument_type v)
 
template<typename Operation1 , typename Operation2 >
unary_compose< Operation1, Operation2 > compose1 (const Operation1 &f, const Operation2 &g)
 
template<typename Operation1 , typename Operation2 , typename Operation3 >
binary_compose< Operation1, Operation2, Operation3 > compose2 (const Operation1 &f, const Operation2 &g, const Operation3 &h)
 
template<class T , typename VT >
const_mem_var1_t< binder2nd< equal_to< VT > >, T, VT > mem_var_equal_to (const VT T::*mvp, const VT &v)
 
template<class T , typename VT >
const_mem_var1_t< binder2nd< less< VT > >, T, VT > mem_var_less (const VT T::*mvp, const VT &v)
 
template<class T , typename VT >
const_mem_var2_t< equal_to< VT >, T, VT > mem_var_equal_to (const VT T::*mvp)
 
template<class T , typename VT >
const_mem_var2_t< less< VT >, T, VT > mem_var_less (const VT T::*mvp)
 
template<typename RandomAccessIterator , typename Compare >
bool is_heap (RandomAccessIterator first, RandomAccessIterator last, Compare comp)
 Returns true if the given range is a heap under comp. A heap is a sequentially encoded binary tree where for every node comp(node,child1) is false and comp(node,child2) is false.
 
template<typename RandomAccessIterator , typename Compare >
void make_heap (RandomAccessIterator first, RandomAccessIterator last, Compare comp)
 make_heap turns the range [first, last) into a heap At completion, is_heap (first, last, comp) is true. The algorithm is adapted from "Classic Data Structures in C++" by Timothy Budd.
 
template<typename RandomAccessIterator , typename Compare >
void push_heap (RandomAccessIterator first, RandomAccessIterator last, Compare comp)
 Inserts the *–last into the preceeding range assumed to be a heap.
 
template<typename RandomAccessIterator , typename Compare >
void pop_heap (RandomAccessIterator first, RandomAccessIterator last, Compare comp)
 
template<typename RandomAccessIterator , typename Compare >
void sort_heap (RandomAccessIterator first, RandomAccessIterator last, Compare comp)
 
template<class Container >
insert_iterator< Container > inserter (Container &ctr, typename Container::iterator ip)
 Returns the insert_iterator for ctr.
 
template<class Container >
back_insert_iterator< Container > back_inserter (Container &ctr)
 Returns the back_insert_iterator for ctr.
 
template<typename RandomAccessIterator , typename IndexIterator >
index_iterate< RandomAccessIterator, IndexIterator > index_iterator (RandomAccessIterator ibase, IndexIterator iindex)
 Returns an index_iterate for ibase over iindex.
 
template<typename IndexContainer , typename IteratorContainer >
void indexv_to_iteratorv (typename IteratorContainer::value_type ibase, const IndexContainer &xc, IteratorContainer &ic)
 Converts the indexes in xc to iterators in ic of base ibase.
 
template<typename Container >
Container::iterator unconst (typename Container::const_iterator i, Container &)
 
template<typename Container1 , typename Container2 >
Container2::iterator ibyi (typename Container1::iterator idx, Container1 &ctr1, Container2 &ctr2)
 Converts a const_iterator in one container into a const_iterator in another container.
 
template<size_t NX, size_t NY, typename T >
void load_identity (matrix< NX, NY, T > &m)
 Creates an identity matrix in m.
 
template<size_t NX, size_t NY, typename T >
matrix< NY, NY, T > operator* (const matrix< NX, NY, T > &m1, const matrix< NY, NX, T > &m2)
 Multiplies two matrices.
 
template<size_t NX, size_t NY, typename T >
tuple< NX, T > operator* (const tuple< NY, T > &t, const matrix< NX, NY, T > &m)
 Transforms vector t with matrix m.
 
template<size_t N, typename T >
void transpose (matrix< N, N, T > &m)
 Transposes (exchanges rows and columns) matrix m.
 
void _sse_load_matrix (const float *m)
 
void _sse_transform_to_vector (float *result)
 
template<>
tuple< 4, float > operator* (const tuple< 4, float > &t, const matrix< 4, 4, float > &m)
 
template<>
matrix< 4, 4, float > operator* (const matrix< 4, 4, float > &m1, const matrix< 4, 4, float > &m2)
 
template<typename T >
void construct (T *p)
 
template<typename ForwardIterator >
void construct (ForwardIterator first, ForwardIterator last)
 
template<typename T >
void construct (T *p, const T &value)
 
template<typename T >
void destroy (T *p) noexcept
 
template<typename T >
void dtors (T first, T last) noexcept
 
template<typename ForwardIterator >
void destroy (ForwardIterator first, ForwardIterator last) noexcept
 
template<typename T >
T * cast_to_type (void *p, const T *)
 Casts p to the type of the second pointer argument.
 
template<typename T >
pair< T *, ptrdiff_t > make_temporary_buffer (void *p, size_t n, const T *ptype)
 Creates a temporary buffer pair from p and n This is intended to be used with alloca to create temporary buffers. The size in the returned pair is set to 0 if the allocation is unsuccessful.
 
template<typename InputIterator , typename ForwardIterator >
ForwardIterator uninitialized_copy (InputIterator first, InputIterator last, ForwardIterator result)
 
template<typename InputIterator , typename ForwardIterator >
ForwardIterator uninitialized_copy_n (InputIterator first, size_t n, ForwardIterator result)
 
template<typename ForwardIterator , typename T >
void uninitialized_fill (ForwardIterator first, ForwardIterator last, const T &v)
 
template<typename ForwardIterator , typename T >
ForwardIterator uninitialized_fill_n (ForwardIterator first, size_t n, const T &v)
 
template<typename InputIterator , typename T >
accumulate (InputIterator first, InputIterator last, T init)
 
template<typename InputIterator , typename T , typename BinaryFunction >
accumulate (InputIterator first, InputIterator last, T init, BinaryFunction binary_op)
 
template<typename ForwardIterator , typename T >
void iota (ForwardIterator first, ForwardIterator last, T value)
 
template<typename InputIterator1 , typename InputIterator2 , typename T >
inner_product (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, T init)
 
template<typename InputIterator1 , typename InputIterator2 , typename T , typename BinaryOperation1 , typename BinaryOperation2 >
inner_product (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, T init, BinaryOperation1 sumOp, BinaryOperation2 productOp)
 
template<typename InputIterator , typename OutputIterator >
OutputIterator partial_sum (InputIterator first, InputIterator last, OutputIterator result)
 
template<typename InputIterator , typename OutputIterator , typename BinaryOperation >
OutputIterator partial_sum (InputIterator first, InputIterator last, OutputIterator result, BinaryOperation sumOp)
 
template<typename InputIterator , typename OutputIterator >
OutputIterator adjacent_difference (InputIterator first, InputIterator last, OutputIterator result)
 
template<typename InputIterator , typename OutputIterator , typename BinaryOperation >
OutputIterator adjacent_difference (InputIterator first, InputIterator last, OutputIterator result, BinaryOperation differenceOp)
 
template<typename T >
power (T x, unsigned n)
 Returns x^n. Donald Knuth's Russian Peasant algorithm.
 
template<typename T , typename BinaryOperation >
power (T x, unsigned n, BinaryOperation op)
 Returns x^n, using op instead of multiplication. Donald Knuth's Russian Peasant algorithm.
 
template<typename T1 , typename T2 >
pair< T1, T2 > make_pair (T1 &&a, T2 &&b)
 Returns a pair object with (a,b)
 
template<typename InputIterator , typename OutputIterator , typename Predicate >
OutputIterator copy_if (InputIterator first, InputIterator last, OutputIterator result, Predicate pred)
 
template<typename InputIterator , typename Predicate >
InputIterator find_if (InputIterator first, InputIterator last, Predicate pred)
 
template<typename ForwardIterator , typename BinaryPredicate >
ForwardIterator adjacent_find (ForwardIterator first, ForwardIterator last, BinaryPredicate p)
 
template<typename InputIterator , typename BinaryPredicate >
pair< InputIterator, InputIterator > mismatch (InputIterator first1, InputIterator last1, InputIterator first2, BinaryPredicate comp)
 
template<typename InputIterator , typename BinaryPredicate >
bool equal (InputIterator first1, InputIterator last1, InputIterator first2, BinaryPredicate comp)
 
template<typename InputIterator , typename Predicate >
size_t count_if (InputIterator first, InputIterator last, Predicate pred)
 
template<typename ForwardIterator , typename Predicate , typename T >
void replace_if (ForwardIterator first, ForwardIterator last, Predicate pred, const T &new_value)
 
template<typename InputIterator , typename OutputIterator , typename Predicate , typename T >
OutputIterator replace_copy_if (InputIterator first, InputIterator last, OutputIterator result, Predicate pred, const T &new_value)
 
template<typename InputIterator , typename OutputIterator , typename Predicate >
OutputIterator remove_copy_if (InputIterator first, InputIterator last, OutputIterator result, Predicate pred)
 
template<typename ForwardIterator , typename Predicate >
ForwardIterator remove_if (ForwardIterator first, ForwardIterator last, Predicate pred)
 
template<typename InputIterator , typename OutputIterator , typename BinaryPredicate >
OutputIterator unique_copy (InputIterator first, InputIterator last, OutputIterator result, BinaryPredicate binary_pred)
 
template<typename ForwardIterator , typename BinaryPredicate >
ForwardIterator unique (ForwardIterator first, ForwardIterator last, BinaryPredicate binary_pred)
 
template<typename ForwardIterator , typename T , typename StrictWeakOrdering >
ForwardIterator lower_bound (ForwardIterator first, ForwardIterator last, const T &value, StrictWeakOrdering comp)
 
template<typename ForwardIterator , typename T , typename StrictWeakOrdering >
bool binary_search (ForwardIterator first, ForwardIterator last, const T &value, StrictWeakOrdering comp)
 
template<typename ForwardIterator , typename T , typename StrictWeakOrdering >
ForwardIterator upper_bound (ForwardIterator first, ForwardIterator last, const T &value, StrictWeakOrdering comp)
 
template<typename ForwardIterator , typename T , typename StrictWeakOrdering >
pair< ForwardIterator, ForwardIterator > equal_range (ForwardIterator first, ForwardIterator last, const T &value, StrictWeakOrdering comp)
 
template<typename RandomAccessIterator , typename Compare >
void nth_element (RandomAccessIterator first, RandomAccessIterator, RandomAccessIterator last, Compare comp)
 Puts nth element into its sorted position. In this implementation, the entire array is sorted. The performance difference is so small and the function use is so rare, there is no need to have code for it.
 
template<typename ForwardIterator1 , typename ForwardIterator2 , typename BinaryPredicate >
ForwardIterator1 search (ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate comp)
 Searches for the first subsequence [first2,last2) in [first1,last1)
 
template<typename ForwardIterator1 , typename ForwardIterator2 , typename BinaryPredicate >
ForwardIterator1 find_end (ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2, ForwardIterator2 last2, BinaryPredicate comp)
 Searches for the last subsequence [first2,last2) in [first1,last1)
 
template<typename Iterator , typename T , typename BinaryPredicate >
Iterator search_n (Iterator first, Iterator last, size_t count, const T &value, BinaryPredicate comp)
 Searches for the first occurence of count values in [first, last)
 
template<typename InputIterator , typename ForwardIterator , typename BinaryPredicate >
InputIterator find_first_of (InputIterator first1, InputIterator last1, ForwardIterator first2, ForwardIterator last2, BinaryPredicate comp)
 Searches [first1,last1) for the first occurrence of an element from [first2,last2)
 
template<typename InputIterator1 , typename InputIterator2 , typename StrictWeakOrdering >
bool includes (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, StrictWeakOrdering comp)
 Returns true if [first2,last2) is a subset of [first1,last1)
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename StrictWeakOrdering >
OutputIterator set_union (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, StrictWeakOrdering comp)
 Merges [first1,last1) with [first2,last2) More...
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename StrictWeakOrdering >
OutputIterator set_intersection (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, StrictWeakOrdering comp)
 Creates a set containing elements shared by the given ranges.
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename StrictWeakOrdering >
OutputIterator set_difference (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, StrictWeakOrdering comp)
 Removes from [first1,last1) elements present in [first2,last2)
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename StrictWeakOrdering >
OutputIterator set_symmetric_difference (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, StrictWeakOrdering comp)
 Performs union of sets A-B and B-A.
 
template<typename ForwardIterator , typename StrictWeakOrdering >
bool is_sorted (ForwardIterator first, ForwardIterator last, StrictWeakOrdering comp)
 Returns true if the given range is sorted.
 
template<typename InputIterator1 , typename InputIterator2 , typename BinaryPredicate >
bool lexicographical_compare (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, BinaryPredicate comp)
 Compares two given containers like strcmp compares strings.
 
template<typename BidirectionalIterator , typename StrictWeakOrdering >
bool next_permutation (BidirectionalIterator first, BidirectionalIterator last, StrictWeakOrdering comp)
 Creates the next lexicographical permutation of [first,last). Returns false if no further permutations can be created.
 
template<typename BidirectionalIterator , typename StrictWeakOrdering >
bool prev_permutation (BidirectionalIterator first, BidirectionalIterator last, StrictWeakOrdering comp)
 Creates the previous lexicographical permutation of [first,last). Returns false if no further permutations can be created.
 
template<typename ForwardIterator , typename BinaryPredicate >
ForwardIterator max_element (ForwardIterator first, ForwardIterator last, BinaryPredicate comp)
 Returns iterator to the max element in [first,last)
 
template<typename ForwardIterator , typename BinaryPredicate >
ForwardIterator min_element (ForwardIterator first, ForwardIterator last, BinaryPredicate comp)
 Returns iterator to the min element in [first,last)
 
template<typename RandomAccessIterator , typename StrictWeakOrdering >
void partial_sort (RandomAccessIterator first, RandomAccessIterator, RandomAccessIterator last, StrictWeakOrdering comp)
 Makes [first,middle) a part of the sorted array. Contents of [middle,last) is undefined. This implementation just calls stable_sort.
 
template<typename InputIterator , typename RandomAccessIterator , typename StrictWeakOrdering >
RandomAccessIterator partial_sort_copy (InputIterator first, InputIterator last, RandomAccessIterator result_first, RandomAccessIterator result_last, StrictWeakOrdering comp)
 Like partial_sort, but outputs to [result_first,result_last)
 
template<typename ForwardIterator , typename Predicate >
ForwardIterator stable_partition (ForwardIterator first, ForwardIterator last, Predicate pred)
 Like partition, but preserves equal element order.
 
template<typename ForwardIterator , typename Predicate >
ForwardIterator partition (ForwardIterator first, ForwardIterator last, Predicate pred)
 Splits [first,last) in two by pred. More...
 
template<>
void swap (cmemlink &a, cmemlink &b)
 
template<>
void swap (memlink &a, memlink &b)
 
template<>
void swap (memblock &a, memblock &b)
 
template<>
void swap (string &a, string &b)
 
 TEMPLATE_SWAP_PSPEC (TEMPLATE_TYPE1(vector, T), TEMPLATE_DECL1(T)) TEMPLATE_SWAP_PSPEC(TEMPLATE_TYPE1(set
 
 TEMPLATE_DECL1 (T)) TEMPLATE_SWAP_PSPEC(TEMPLATE_TYPE1(multiset
 
 TEMPLATE_FULL_DECL2 (size_t, N, typename, T)) template< typename T1
 Reads pair p from stream is.
 
T2 istreamoperator>> (istream &is, pair< T1, T2 > &p)
 
template<typename T1 , typename T2 >
ostreamoperator<< (ostream &os, const pair< T1, T2 > &p)
 Writes pair p to stream os.
 
template<typename T1 , typename T2 >
ostringstreamoperator<< (ostringstream &os, const pair< T1, T2 > &p)
 Writes pair p to stream os.
 
template<typename Container >
pair< typename Container::iterator, typename Container::iterator > unconst (const pair< typename Container::const_iterator, typename Container::const_iterator > &i, Container &)
 Converts a const_iterator pair into an iterator pair Useful for converting pair ranges returned by equal_range, for instance. This is an extension, available in uSTL.
 
template<typename T >
size_t stream_align_of (const vector< T > &)
 
template<size_t Size>
istringstreamoperator>> (istringstream &is, bitset< Size > &v)
 Writes bitset v into stream os.
 
template<size_t N, typename T >
istreamoperator>> (istream &is, tuple< N, T > &v)
 
template<size_t N, typename T >
ostreamoperator<< (ostream &os, const tuple< N, T > &v)
 
template<size_t N, typename T >
ostringstreamoperator<< (ostringstream &os, const tuple< N, T > &v)
 
template<size_t N, typename T >
size_t stream_align_of (const tuple< N, T > &)
 
template<typename T , typename IntT >
ostringstreamchartype_text_write (ostringstream &os, const T &v)
 
template<>
ostringstreamcontainer_element_text_write (ostringstream &os, const uint8_t &v)
 
template<>
ostringstreamcontainer_element_text_write (ostringstream &os, const int8_t &v)
 
template<size_t NX, size_t NY, typename T >
ostringstreamoperator<< (ostringstream &os, const matrix< NX, NY, T > &v)
 Writes tuple v into stream os.
 
_long4grainlong4grain (unsigned long &v)
 Wrap long values to allow writing them on 4-grain even on 64bit platforms.
 
const _long4grain long4grain (const unsigned long &v)
 Wrap long values to allow writing them on 4-grain even on 64bit platforms.
 
template<typename T >
_long4grainptr4grain (T *&p)
 Wrap pointer values to allow writing them on 4-grain even on 64bit platforms.
 
template<typename T >
const _long4grain ptr4grain (const T *const &p)
 Wrap pointer values to allow writing them on 4-grain even on 64bit platforms.
 
string operator+ (const char *cs, const string &ss)
 
hashvalue_t hash_value (const char *first, const char *last)
 
hashvalue_t hash_value (const char *v)
 
size_t Utf8Bytes (wchar_t v)
 Returns the number of bytes required to UTF-8 encode v.
 
size_t Utf8Bytes (const wchar_t *first, const wchar_t *last)
 Measures the size of a wchar_t array in UTF-8 encoding.
 
size_t Utf8SequenceBytes (wchar_t c)
 Returns the number of bytes in a UTF-8 sequence that starts with c.
 
template<typename Iterator >
utf8out_iterator< Iterator > utf8out (Iterator i)
 Returns a UTF-8 adaptor writing to i. Useful in conjuction with back_insert_iterator.
 
template<typename Iterator >
utf8in_iterator< Iterator > utf8in (Iterator i)
 Returns a UTF-8 adaptor reading from i.
 
 UNARY_TRAIT_DEFN (__is_void)
 
 UNARY_TRAIT_TRUE (__is_void, void)
 
 UNARY_TRAIT_DEFB (is_void, __is_void< remove_cv_t< T >>::value)
 
 UNARY_TRAIT_DEFN (__is_integral)
 
 UNARY_TRAIT_TRUE (__is_integral, char)
 
 UNARY_TRAIT_TRUE (__is_integral, signed char)
 
 UNARY_TRAIT_TRUE (__is_integral, short)
 
 UNARY_TRAIT_TRUE (__is_integral, int)
 
 UNARY_TRAIT_TRUE (__is_integral, long)
 
 UNARY_TRAIT_TRUE (__is_integral, unsigned char)
 
 UNARY_TRAIT_TRUE (__is_integral, unsigned long long)
 
 UNARY_TRAIT_TRUE (__is_integral, wchar_t)
 
 UNARY_TRAIT_TRUE (__is_integral, bool)
 
 UNARY_TRAIT_DEFB (is_integral, __is_integral< remove_cv_t< T >>::value)
 
 UNARY_TRAIT_DEFN (__is_floating_point)
 
 UNARY_TRAIT_TRUE (__is_floating_point, float)
 
 UNARY_TRAIT_TRUE (__is_floating_point, double)
 
 UNARY_TRAIT_TRUE (__is_floating_point, long double)
 
 UNARY_TRAIT_DEFB (is_floating_point, __is_floating_point< remove_cv_t< T >>::value)
 
 UNARY_TRAIT_DEFN (is_array)
 
 UNARY_TRAIT_DEFN (is_lvalue_reference)
 
 UNARY_TRAIT_DEFN (is_rvalue_reference)
 
 UNARY_TRAIT_DEFB (is_reference, is_lvalue_reference< T >::value||is_rvalue_reference< T >::value)
 
 UNARY_TRAIT_DEFB (is_union, __is_union(T))
 
 UNARY_TRAIT_DEFB (is_class, __is_class(T))
 
 UNARY_TRAIT_DEFB (is_enum, __is_enum(T))
 
 UNARY_TRAIT_DEFN (__is_member_pointer)
 
 UNARY_TRAIT_DEFB (is_member_pointer, __is_member_pointer< remove_cv_t< T >>::value)
 
 UNARY_TRAIT_DEFN (__is_member_function_pointer)
 
 UNARY_TRAIT_DEFB (is_member_function_pointer, __is_member_function_pointer< remove_cv_t< T >>::value)
 
 UNARY_TRAIT_DEFB (is_member_object_pointer, is_member_pointer< T >::value &&!is_member_function_pointer< T >::value)
 
 UNARY_TRAIT_DEFN (is_function)
 
 UNARY_TRAIT_DEFB (is_object,!is_reference< T >::value &&!is_void< T >::value &&!is_function< T >::value)
 
 UNARY_TRAIT_DEFB (__is_referenceable, is_reference< T >::value||is_object< T >::value)
 
 UNARY_TRAIT_DEFB (is_arithmetic, is_integral< T >::value||is_floating_point< T >::value)
 
 UNARY_TRAIT_DEFB (is_fundamental, is_arithmetic< T >::value||is_void< T >::value)
 
 UNARY_TRAIT_DEFB (is_scalar, is_arithmetic< T >::value||is_enum< T >::value||is_pointer< T >::value||is_member_pointer< T >::value)
 
 UNARY_TRAIT_DEFB (is_compound,!is_fundamental< T >::value)
 
template<typename T >
add_rvalue_reference_t< T > declval (void) noexcept
 Unusable default value for T. Use with decltype.
 
 UNARY_TRAIT_DEFN (is_const)
 
 UNARY_TRAIT_DEFN (is_volatile)
 
 UNARY_TRAIT_DEFB (is_empty, __is_empty(T))
 
 UNARY_TRAIT_DEFB (is_abstract, __is_abstract(T))
 
 UNARY_TRAIT_DEFB (is_literal_type, __is_literal_type(T))
 
 UNARY_TRAIT_DEFB (is_polymorphic, __is_polymorphic(T))
 
 UNARY_TRAIT_DEFB (is_standard_layout, __is_standard_layout(T))
 
 UNARY_TRAIT_DEFB (is_pod, __is_pod(T)||is_scalar< T >::value||(is_array< T >::value &&is_scalar< remove_all_extents_t< T >>::value))
 
 UNARY_TRAIT_DEFB (is_trivial, is_pod< T >::value||__is_trivial(T))
 
 UNARY_TRAIT_DEFB (has_trivial_copy, is_pod< T >::value||__has_trivial_copy(T))
 
 UNARY_TRAIT_DEFB (has_trivial_assign, is_pod< T >::value||__has_trivial_assign(T))
 
 UNARY_TRAIT_DEFB (has_trivial_constructor, is_pod< T >::value||__has_trivial_constructor(T))
 
 UNARY_TRAIT_DEFB (has_trivial_destructor, is_pod< T >::value||__has_trivial_destructor(T))
 
 UNARY_TRAIT_DEFB (has_virtual_destructor, __has_virtual_destructor(T))
 
 UNARY_TRAIT_DEFB (has_nothrow_assign, __has_nothrow_assign(T))
 
 UNARY_TRAIT_DEFB (has_nothrow_copy, __has_nothrow_copy(T))
 
 UNARY_TRAIT_DEFB (has_nothrow_constructor, __has_nothrow_constructor(T))
 
 UNARY_TRAIT_DEFN (__is_signed)
 
 UNARY_TRAIT_TRUE (__is_signed, char)
 
 UNARY_TRAIT_TRUE (__is_signed, wchar_t)
 
 UNARY_TRAIT_TRUE (__is_signed, short)
 
 UNARY_TRAIT_TRUE (__is_signed, int)
 
 UNARY_TRAIT_TRUE (__is_signed, long)
 
 UNARY_TRAIT_TRUE (__is_signed, float)
 
 UNARY_TRAIT_TRUE (__is_signed, double)
 
 UNARY_TRAIT_DEFB (is_signed, __is_signed< remove_cv_t< T >>::value)
 
 UNARY_TRAIT_DEFB (is_unsigned,!is_signed< T >::value)
 
template<size_t N, typename T1 , typename T2 >
bool operator== (const tuple< N, T1 > &t1, const tuple< N, T2 > &t2)
 
template<size_t N, typename T1 , typename T2 >
bool operator< (const tuple< N, T1 > &t1, const tuple< N, T2 > &t2)
 
template<size_t N, typename T1 , typename T2 >
tuple< N, T1 > & operator+= (tuple< N, T1 > &t1, const tuple< N, T2 > &t2)
 
template<size_t N, typename T1 , typename T2 >
tuple< N, T1 > & operator-= (tuple< N, T1 > &t1, const tuple< N, T2 > &t2)
 
template<size_t N, typename T1 , typename T2 >
tuple< N, T1 > & operator*= (tuple< N, T1 > &t1, const tuple< N, T2 > &t2)
 
template<size_t N, typename T1 , typename T2 >
tuple< N, T1 > & operator/= (tuple< N, T1 > &t1, const tuple< N, T2 > &t2)
 
template<size_t N, typename T1 , typename T2 >
tuple< N, T1 > operator+ (const tuple< N, T1 > &t1, const tuple< N, T2 > &t2)
 
template<size_t N, typename T1 , typename T2 >
tuple< N, T1 > operator- (const tuple< N, T1 > &t1, const tuple< N, T2 > &t2)
 
template<size_t N, typename T1 , typename T2 >
tuple< N, T1 > operator* (const tuple< N, T1 > &t1, const tuple< N, T2 > &t2)
 
template<size_t N, typename T1 , typename T2 >
tuple< N, T1 > operator/ (const tuple< N, T1 > &t1, const tuple< N, T2 > &t2)
 
template<typename T , size_t N>
constexpr T * VectorEnd (T(&a)[N])
 Returns the end() for a static vector.
 
template<typename T1 , typename T2 >
constexpr T1 min (const T1 &a, const T2 &b)
 Returns the minimum of a and b.
 
template<typename T1 , typename T2 >
constexpr T1 max (const T1 &a, const T2 &b)
 Returns the maximum of a and b.
 
template<typename T , size_t N>
constexpr T & VectorElement (T(&v)[N], size_t i)
 Indexes into a static array with bounds limit.
 
template<typename T >
constexpr T AlignDown (T n, size_t grain=c_DefaultAlignment)
 Rounds n up to be divisible by grain.
 
template<typename T >
constexpr T Align (T n, size_t grain=c_DefaultAlignment)
 Rounds n up to be divisible by grain.
 
template<typename T >
constexpr T * NullPointer (void)
 Returns a nullptr pointer cast to T.
 
template<typename T >
constexpr T & NullValue (void)
 Returns a non-dereferentiable value reference. This is useful for passing to stream_align_of or the like which need a value but don't need to actually use it.
 
template<typename T , typename Distance >
advance (T i, Distance offset)
 Offsets an iterator.
 
template<typename T1 , typename T2 >
constexpr ptrdiff_t distance (T1 i1, T2 i2)
 Returns the difference p1 - p2.
 
template<typename T >
constexpr T absv (T v)
 Returns the absolute value of v Unlike the stdlib functions, this is inline and works with all types.
 
template<typename T >
constexpr T sign (T v)
 Returns -1 for negative values, 1 for positive, and 0 for 0.
 
template<typename T1 , typename T2 >
constexpr size_t abs_distance (T1 i1, T2 i2)
 Returns the absolute value of the distance i1 and i2.
 
template<typename T >
constexpr size_t size_of_elements (size_t n, const T *)
 Returns the size of n elements of size T.
 
uint16_t bswap_16 (uint16_t v)
 
uint32_t bswap_32 (uint32_t v)
 
uint64_t bswap_64 (uint64_t v)
 
template<typename T >
bswap (const T &v)
 Swaps the byteorder of v.
 
template<typename T >
le_to_native (const T &v)
 
template<typename T >
be_to_native (const T &v)
 
template<typename T >
native_to_le (const T &v)
 
template<typename T >
native_to_be (const T &v)
 
template<typename T >
void Delete (T *&p)
 Deletes p and sets it to nullptr.
 
template<typename T >
void DeleteVector (T *&p)
 Deletes p as an array and sets it to nullptr.
 
template<typename T >
constexpr bool operator!= (const T &x, const T &y)
 Template of making != from ! and ==.
 
template<typename T >
constexpr bool operator> (const T &x, const T &y)
 Template of making > from <.
 
template<typename T >
constexpr bool operator<= (const T &x, const T &y)
 Template of making <= from < and ==.
 
template<typename T >
constexpr bool operator>= (const T &x, const T &y)
 Template of making >= from < and ==.
 
template<typename TSmall , typename TBig >
void pack_type (TSmall s, TBig &b)
 Packs s multiple times into b. Useful for loop unrolling.
 
template<typename T1 , typename T2 >
T1 DivRU (T1 n1, T2 n2)
 Divides n1 by n2 and rounds the result up. This is in contrast to regular division, which rounds down.
 
bool TestAndSet (int *pm)
 Sets the contents of pm to 1 and returns true if the previous value was 0.
 
uoff_t FirstBit (uint32_t v, uoff_t nbv)
 Returns the index of the first set bit in v or nbv if none.
 
uoff_t FirstBit (uint64_t v, uoff_t nbv)
 Returns the index of the first set bit in v or nbv if none.
 
uint32_t NextPow2 (uint32_t v)
 
template<typename T >
Rol (T v, size_t n)
 Bitwise rotate value left.
 
template<typename T >
Ror (T v, size_t n)
 Bitwise rotate value right.
 
template<typename DEST , typename SRC >
DEST noalias (const DEST &, SRC *s)
 This template is to be used for dereferencing a type-punned pointer without a warning. More...
 
template<typename DEST , typename SRC >
DEST noalias_cast (SRC s)
 

Variables

ifstream cin (STDIN_FILENO)
 
ofstream cout (STDOUT_FILENO)
 
ofstream cerr (STDERR_FILENO)
 
const char _FmtPrtChr [2][8] ={"'%c'","%d"}
 
const char endl = '\n'
 End of line character.
 
const char ends = '\0'
 End of string character.
 
 T
 
 N
 
const size_t c_DefaultAlignment = __alignof__(void*)
 The alignment performed by default.
 

Detailed Description

The ustl namespace contains all ustl classes and algorithms.

Function Documentation

void ustl::convert_to_bitstring ( const bitset_value_type *  v,
size_t  n,
string buf 
)
noexcept

Copies bits from v of size n into buf as MSB "1011001..." LSB If buf is too small, MSB bits will be truncated.

Referenced by ustl::bitset< Size >::to_string().

const char * ustl::demangle_type_name ( char *  buf,
size_t  bufSize,
size_t *  pdmSize 
)
noexcept

Uses C++ ABI call, if available to demangle the contents of buf.

The result is written to buf, with the maximum size of bufSize, and is zero-terminated. The return value is buf.

References min(), and VectorSize.

Referenced by ustl::stream_bounds_exception::info().

uint32_t ustl::NextPow2 ( uint32_t  v)
inline

Returns the next power of 2 >= v. Values larger than UINT32_MAX/2 will return 2^0

References BitsInType, and FirstBit().

Referenced by ustl::memblock::reserve().

template<typename DEST , typename SRC >
DEST ustl::noalias ( const DEST &  ,
SRC *  s 
)
inline

This template is to be used for dereferencing a type-punned pointer without a warning.

When casting a local variable to an unrelated type through a pointer (for example, casting a float to a uint32_t without conversion), the resulting memory location can be accessed through either pointer, which violates the strict aliasing rule. While -fno-strict-aliasing option can be given to the compiler, eliminating this warning, inefficient code may result in some instances, because aliasing inhibits some optimizations. By using this template, and by ensuring the memory is accessed in one way only, efficient code can be produced without the warning. For gcc 4.1.0+.

template<typename Container >
Container::iterator ustl::unconst ( typename Container::const_iterator  i,
Container &   
)
inline

Converts the given const_iterator into an iterator.


Generated on Mon Sep 28 2015 17:58:50 for uSTL by Doxygen 1.8.10