openMSX
Classes | Functions
cstd Namespace Reference

Classes

struct  array
 
struct  CmpLeft
 
struct  CmpRight
 
class  string
 

Functions

template<typename Container >
constexpr auto begin (Container &&c)
 
template<typename Container >
constexpr auto end (Container &&c)
 
template<typename Iter1 , typename Iter2 >
constexpr void iter_swap (Iter1 a, Iter2 b)
 
template<typename InputIt , typename UnaryPredicate >
constexpr InputIt find_if_not (InputIt first, InputIt last, UnaryPredicate p)
 
template<typename ForwardIt , typename UnaryPredicate >
constexpr ForwardIt partition (ForwardIt first, ForwardIt last, UnaryPredicate p)
 
template<typename RAIt , typename Compare = std::less<>>
constexpr void sort (RAIt first, RAIt last, Compare cmp=Compare{})
 
template<typename RandomAccessRange , typename Compare = std::less<>>
constexpr void sort (RandomAccessRange &&range, Compare cmp=Compare{})
 
template<typename InputIt1 , typename InputIt2 >
constexpr bool lexicographical_compare (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2)
 
constexpr size_t strlen (const char *s) noexcept
 
template<typename V , typename ... Ts>
constexpr cstd::array< V, sizeof...(Ts)> array_of (Ts &&...ts)
 
constexpr double upow (double x, unsigned u)
 
constexpr double ipow (double x, int i)
 
template<int ITERATIONS>
constexpr double exp (double x)
 
constexpr double simple_fmod (double x, double y)
 
template<int ITERATIONS>
constexpr double sin_iter (double x)
 
template<int ITERATIONS>
constexpr double cos_iter (double x)
 
template<int ITERATIONS>
constexpr double sin (double x)
 
template<int ITERATIONS>
constexpr double cos (double x)
 
template<int E_ITERATIONS, int L_ITERATIONS>
constexpr double log (double x)
 
template<int E_ITERATIONS, int L_ITERATIONS>
constexpr double log2 (double x)
 
template<int E_ITERATIONS, int L_ITERATIONS>
constexpr double log10 (double x)
 
template<int E_ITERATIONS, int L_ITERATIONS>
constexpr double pow (double x, double y)
 
template<int ITERATIONS>
constexpr double exp2 (double x)
 
constexpr double round (double x)
 

Function Documentation

◆ array_of()

template<typename V , typename ... Ts>
constexpr cstd::array<V, sizeof...(Ts)> cstd::array_of ( Ts &&...  ts)

Definition at line 234 of file cstd.hh.

◆ begin()

template<typename Container >
constexpr auto cstd::begin ( Container &&  c)

Definition at line 31 of file cstd.hh.

Referenced by sort().

◆ cos()

template<int ITERATIONS>
constexpr double cstd::cos ( double  x)

Definition at line 430 of file cstd.hh.

◆ cos_iter()

template<int ITERATIONS>
constexpr double cstd::cos_iter ( double  x)

Definition at line 375 of file cstd.hh.

◆ end()

template<typename Container >
constexpr auto cstd::end ( Container &&  c)

Definition at line 37 of file cstd.hh.

Referenced by sort().

◆ exp()

template<int ITERATIONS>
constexpr double cstd::exp ( double  x)

Definition at line 316 of file cstd.hh.

References M_E, t, and upow().

◆ exp2()

template<int ITERATIONS>
constexpr double cstd::exp2 ( double  x)

Definition at line 499 of file cstd.hh.

References M_LN2.

◆ find_if_not()

template<typename InputIt , typename UnaryPredicate >
constexpr InputIt cstd::find_if_not ( InputIt  first,
InputIt  last,
UnaryPredicate  p 
)

Definition at line 52 of file cstd.hh.

Referenced by partition().

◆ ipow()

constexpr double cstd::ipow ( double  x,
int  i 
)

Definition at line 310 of file cstd.hh.

References upow().

◆ iter_swap()

template<typename Iter1 , typename Iter2 >
constexpr void cstd::iter_swap ( Iter1  a,
Iter2  b 
)

Definition at line 44 of file cstd.hh.

Referenced by partition().

◆ lexicographical_compare()

template<typename InputIt1 , typename InputIt2 >
constexpr bool cstd::lexicographical_compare ( InputIt1  first1,
InputIt1  last1,
InputIt2  first2,
InputIt2  last2 
)

Definition at line 124 of file cstd.hh.

◆ log()

template<int E_ITERATIONS, int L_ITERATIONS>
constexpr double cstd::log ( double  x)

Definition at line 465 of file cstd.hh.

References M_E.

Referenced by openmsx::Disk::getName().

◆ log10()

template<int E_ITERATIONS, int L_ITERATIONS>
constexpr double cstd::log10 ( double  x)

Definition at line 487 of file cstd.hh.

◆ log2()

template<int E_ITERATIONS, int L_ITERATIONS>
constexpr double cstd::log2 ( double  x)

Definition at line 481 of file cstd.hh.

◆ partition()

template<typename ForwardIt , typename UnaryPredicate >
constexpr ForwardIt cstd::partition ( ForwardIt  first,
ForwardIt  last,
UnaryPredicate  p 
)

Definition at line 63 of file cstd.hh.

References find_if_not(), and iter_swap().

◆ pow()

template<int E_ITERATIONS, int L_ITERATIONS>
constexpr double cstd::pow ( double  x,
double  y 
)

Definition at line 493 of file cstd.hh.

◆ round()

constexpr double cstd::round ( double  x)

Definition at line 504 of file cstd.hh.

Referenced by openmsx::PixelOperations< uint16_t >::blend().

◆ simple_fmod()

constexpr double cstd::simple_fmod ( double  x,
double  y 
)

Definition at line 347 of file cstd.hh.

◆ sin()

template<int ITERATIONS>
constexpr double cstd::sin ( double  x)

Definition at line 396 of file cstd.hh.

Referenced by cstd::string::operator string_view().

◆ sin_iter()

template<int ITERATIONS>
constexpr double cstd::sin_iter ( double  x)

Definition at line 354 of file cstd.hh.

◆ sort() [1/2]

template<typename RAIt , typename Compare = std::less<>>
constexpr void cstd::sort ( RAIt  first,
RAIt  last,
Compare  cmp = Compare{} 
)

Definition at line 104 of file cstd.hh.

Referenced by sort(), and openmsx::DBParser::text().

◆ sort() [2/2]

template<typename RandomAccessRange , typename Compare = std::less<>>
constexpr void cstd::sort ( RandomAccessRange &&  range,
Compare  cmp = Compare{} 
)

Definition at line 118 of file cstd.hh.

References begin(), cstd::CmpLeft< T, Compare >::cmp, end(), and sort().

◆ strlen()

constexpr size_t cstd::strlen ( const char *  s)
noexcept

◆ upow()

constexpr double cstd::upow ( double  x,
unsigned  u 
)

Definition at line 299 of file cstd.hh.

Referenced by exp(), and ipow().