Audacity  3.0.3
MemoryX.h
Go to the documentation of this file.
1 #ifndef __AUDACITY_MEMORY_X_H__
2 #define __AUDACITY_MEMORY_X_H__
3 
4 // C++ standard header <memory> with a few extensions
5 #include <iterator>
6 #include <memory>
7 #include <new> // align_val_t and hardware_destructive_interference_size
8 #include <cstdlib> // Needed for free.
9 #ifndef safenew
10 #define safenew new
11 #endif
12 
13 #include <functional>
14 #include <limits>
15 
16 /*
17  * ArrayOf<X>
18  * Not to be confused with std::array (which takes a fixed size) or std::vector
19  * This maintains a pointer allocated by NEW X[]. It's cheap: only one pointer,
20  * with no size and capacity information for resizing as for vector, and if X is
21  * a built-in numeric or pointer type, by default there is no zero filling at
22  * allocation time.
23  */
24 
25 template<typename X>
26 class ArrayOf : public std::unique_ptr<X[]>
27 {
28 public:
29  ArrayOf() {}
30 
31  template<typename Integral>
32  explicit ArrayOf(Integral count, bool initialize = false)
33  {
34  static_assert(std::is_unsigned<Integral>::value, "Unsigned arguments only");
35  reinit(count, initialize);
36  }
37 
38  //ArrayOf(const ArrayOf&) PROHIBITED;
39  ArrayOf(const ArrayOf&) = delete;
40  ArrayOf(ArrayOf&& that)
41  : std::unique_ptr < X[] >
42  (std::move((std::unique_ptr < X[] >&)(that)))
43  {
44  }
46  {
47  std::unique_ptr<X[]>::operator=(std::move(that));
48  return *this;
49  }
50  ArrayOf& operator= (std::unique_ptr<X[]> &&that)
51  {
52  std::unique_ptr<X[]>::operator=(std::move(that));
53  return *this;
54  }
55 
56  template< typename Integral >
57  void reinit(Integral count,
58  bool initialize = false)
59  {
60  static_assert(std::is_unsigned<Integral>::value, "Unsigned arguments only");
61  if (initialize)
62  // Initialize elements (usually, to zero for a numerical type)
63  std::unique_ptr<X[]>::reset(safenew X[count]{});
64  else
65  // Avoid the slight initialization overhead
66  std::unique_ptr<X[]>::reset(safenew X[count]);
67  }
68 };
69 
79 template<typename X>
80 class ArraysOf : public ArrayOf<ArrayOf<X>>
81 {
82 public:
83  ArraysOf() {}
84 
85  template<typename Integral>
86  explicit ArraysOf(Integral N)
87  : ArrayOf<ArrayOf<X>>( N )
88  {}
89 
90  template<typename Integral1, typename Integral2 >
91  ArraysOf(Integral1 N, Integral2 M, bool initialize = false)
92  : ArrayOf<ArrayOf<X>>( N )
93  {
94  static_assert(std::is_unsigned<Integral1>::value, "Unsigned arguments only");
95  static_assert(std::is_unsigned<Integral2>::value, "Unsigned arguments only");
96  for (size_t ii = 0; ii < N; ++ii)
97  (*this)[ii] = ArrayOf<X>{ M, initialize };
98  }
99 
100  //ArraysOf(const ArraysOf&) PROHIBITED;
101  ArraysOf(const ArraysOf&) =delete;
103  {
104  ArrayOf<ArrayOf<X>>::operator=(std::move(that));
105  return *this;
106  }
107 
108  template< typename Integral >
109  void reinit(Integral count)
110  {
111  ArrayOf<ArrayOf<X>>::reinit( count );
112  }
113 
114  template< typename Integral >
115  void reinit(Integral count, bool initialize)
116  {
117  ArrayOf<ArrayOf<X>>::reinit( count, initialize );
118  }
119 
120  template<typename Integral1, typename Integral2 >
121  void reinit(Integral1 countN, Integral2 countM, bool initialize = false)
122  {
123  static_assert(std::is_unsigned<Integral1>::value, "Unsigned arguments only");
124  static_assert(std::is_unsigned<Integral2>::value, "Unsigned arguments only");
125  reinit(countN, false);
126  for (size_t ii = 0; ii < countN; ++ii)
127  (*this)[ii].reinit(countM, initialize);
128  }
129 };
130 
143 template<typename X>
144 class Optional {
145 public:
146 
147  using value_type = X;
148 
149  // Construct as NULL
150  Optional() {}
151 
152  // Supply the copy and move, so you might use this as a class member too
153  Optional(const Optional &that)
154  {
155  if (that)
156  emplace(*that);
157  }
158 
160  {
161  if (this != &that) {
162  if (that)
163  emplace(*that);
164  else
165  reset();
166  }
167  return *this;
168  }
169 
171  {
172  if (that)
173  emplace(::std::move(*that));
174  }
175 
177  {
178  if (this != &that) {
179  if (that)
180  emplace(::std::move(*that));
181  else
182  reset();
183  }
184  return *this;
185  }
186 
192  template<typename... Args>
193  X& emplace(Args&&... args)
194  {
195  // Lose any old value
196  reset();
197  // emplace NEW value
198  pp = safenew(address()) X(std::forward<Args>(args)...);
199  return **this;
200  }
201 
202  // Destroy any object that was built in it
204  {
205  reset();
206  }
207 
208  // Pointer-like operators
209 
211  X &operator* () const
212  {
213  return *pp;
214  }
215 
216  X *operator-> () const
217  {
218  return pp;
219  }
220 
221  void reset()
222  {
223  if (pp)
224  pp->~X(), pp = nullptr;
225  }
226 
227  // So you can say if(ptr)
228  explicit operator bool() const
229  {
230  return pp != nullptr;
231  }
232 
233  bool has_value() const
234  {
235  return pp != nullptr;
236  }
237 
238 private:
239  X* address()
240  {
241  return reinterpret_cast<X*>(&storage);
242  }
243 
244  // Data
245 #if 0
246  typename ::std::aligned_storage<
247  sizeof(X)
248  // , alignof(X) // Not here yet in all compilers
249  >::type storage{};
250 #else
251  union {
252  double d;
253  char storage[sizeof(X)];
254  };
255 #endif
256  X* pp{ nullptr };
257 };
258 
262 struct freer { void operator() (void *p) const { free(p); } };
263 
267 template< typename T >
268 using MallocPtr = std::unique_ptr< T, freer >;
269 
273 template <typename Character = char>
274 using MallocString = std::unique_ptr< Character[], freer >;
275 
281 template <typename T>
282 struct Destroyer {
283  void operator () (T *p) const { if (p) p->Destroy(); }
284 };
285 
289 template <typename T>
290 using Destroy_ptr = std::unique_ptr<T, Destroyer<T>>;
291 
299 // Construct this from any copyable function object, such as a lambda
300 template <typename F>
301 struct Final_action {
302  Final_action(F f) : clean( f ) {}
304  F clean;
305 };
306 
309 template <typename F>
310 Final_action<F> finally (F f)
311 {
312  return Final_action<F>(f);
313 }
314 
315 #include <algorithm>
316 
320 template< typename T >
321 struct RestoreValue {
323  void operator () ( T *p ) const { if (p) *p = oldValue; }
324 };
325 
326 
330 template< typename T >
331 class ValueRestorer : public std::unique_ptr< T, RestoreValue<T> >
332 {
333  using std::unique_ptr< T, RestoreValue<T> >::reset; // make private
334  // But release() remains public and can be useful to commit a changed value
335 public:
336  explicit ValueRestorer( T &var )
337  : std::unique_ptr< T, RestoreValue<T> >( &var, { var } )
338  {}
339  explicit ValueRestorer( T &var, const T& newValue )
340  : std::unique_ptr< T, RestoreValue<T> >( &var, { var } )
341  { var = newValue; }
343  : std::unique_ptr < T, RestoreValue<T> > ( std::move(that) ) {};
345  {
346  if (this != &that)
347  std::unique_ptr < T, RestoreValue<T> >::operator=(std::move(that));
348  return *this;
349  }
350 };
351 
353 template< typename T >
355 { return ValueRestorer< T >{ var }; }
356 
357 template< typename T >
358 ValueRestorer< T > valueRestorer( T& var, const T& newValue )
359 { return ValueRestorer< T >{ var, newValue }; }
360 
365 template< typename Value, typename Category = std::forward_iterator_tag >
366 using ValueIterator = std::iterator<
367  Category, const Value, ptrdiff_t,
368  // void pointer type so that operator -> is disabled
369  void,
370  // make "reference type" really the same as the value type
371  const Value
372 >;
373 
377 template <typename Iterator>
378 struct IteratorRange : public std::pair<Iterator, Iterator> {
379  using iterator = Iterator;
380  using reverse_iterator = std::reverse_iterator<Iterator>;
381 
382  IteratorRange (const Iterator &a, const Iterator &b)
383  : std::pair<Iterator, Iterator> ( a, b ) {}
384 
385  IteratorRange (Iterator &&a, Iterator &&b)
386  : std::pair<Iterator, Iterator> ( std::move(a), std::move(b) ) {}
387 
389  { return { this->rbegin(), this->rend() }; }
390 
391  Iterator begin() const { return this->first; }
392  Iterator end() const { return this->second; }
393 
394  reverse_iterator rbegin() const { return reverse_iterator{ this->second }; }
395  reverse_iterator rend() const { return reverse_iterator{ this->first }; }
396 
397  bool empty() const { return this->begin() == this->end(); }
398  explicit operator bool () const { return !this->empty(); }
399  size_t size() const { return std::distance(this->begin(), this->end()); }
400 
401  template <typename T> iterator find(const T &t) const
402  { return std::find(this->begin(), this->end(), t); }
403 
404  template <typename T> long index(const T &t) const
405  {
406  auto iter = this->find(t);
407  if (iter == this->end())
408  return -1;
409  return std::distance(this->begin(), iter);
410  }
411 
412  template <typename T> bool contains(const T &t) const
413  { return this->end() != this->find(t); }
414 
415  template <typename F> iterator find_if(const F &f) const
416  { return std::find_if(this->begin(), this->end(), f); }
417 
418  template <typename F> long index_if(const F &f) const
419  {
420  auto iter = this->find_if(f);
421  if (iter == this->end())
422  return -1;
423  return std::distance(this->begin(), iter);
424  }
425 
426  // to do: use std::all_of, any_of, none_of when available on all platforms
427  template <typename F> bool all_of(const F &f) const
428  {
429  auto notF =
430  [&](typename std::iterator_traits<Iterator>::reference v)
431  { return !f(v); };
432  return !this->any_of( notF );
433  }
434 
435  template <typename F> bool any_of(const F &f) const
436  { return this->end() != this->find_if(f); }
437 
438  template <typename F> bool none_of(const F &f) const
439  { return !this->any_of(f); }
440 
441  template<typename T> struct identity
442  { const T&& operator () (T &&v) const { return std::forward(v); } };
443 
444  // Like std::accumulate, but the iterators implied, and with another
445  // unary operation on the iterator value, pre-composed
446  template<
447  typename R,
448  typename Binary = std::plus< R >,
449  typename Unary = identity< decltype( *std::declval<Iterator>() ) >
450  >
452  R init,
453  Binary binary_op = {},
454  Unary unary_op = {}
455  ) const
456  {
457  R result = init;
458  for (auto&& v : *this)
459  result = binary_op(result, unary_op(v));
460  return result;
461  }
462 
463  // An overload making it more convenient to use with pointers to member
464  // functions
465  template<
466  typename R,
467  typename Binary = std::plus< R >,
468  typename R2, typename C
469  >
471  R init,
472  Binary binary_op,
473  R2 (C :: * pmf) () const
474  ) const
475  {
476  return this->accumulate( init, binary_op, std::mem_fn( pmf ) );
477  }
478 
479  // Some accumulations frequent enough to be worth abbreviation:
480  template<
481  typename Unary = identity< decltype( *std::declval<Iterator>() ) >,
482  typename R = decltype( std::declval<Unary>()( *std::declval<Iterator>() ) )
483  >
484  R min( Unary unary_op = {} ) const
485  {
486  return this->accumulate(
487  std::numeric_limits< R >::max(),
488  (const R&(*)(const R&, const R&)) std::min,
489  unary_op
490  );
491  }
492 
493  template<
494  typename R2, typename C,
495  typename R = R2
496  >
497  R min( R2 (C :: * pmf) () const ) const
498  {
499  return this->min( std::mem_fn( pmf ) );
500  }
501 
502  template<
503  typename Unary = identity< decltype( *std::declval<Iterator>() ) >,
504  typename R = decltype( std::declval<Unary>()( *std::declval<Iterator>() ) )
505  >
506  R max( Unary unary_op = {} ) const
507  {
508  return this->accumulate(
509  std::numeric_limits< R >::lowest(),
510  (const R&(*)(const R&, const R&)) std::max,
511  unary_op
512  );
513  }
514 
515  template<
516  typename R2, typename C,
517  typename R = R2
518  >
519  R max( R2 (C :: * pmf) () const ) const
520  {
521  return this->max( std::mem_fn( pmf ) );
522  }
523 
524  template<
525  typename Unary = identity< decltype( *std::declval<Iterator>() ) >,
526  typename R = decltype( std::declval<Unary>()( *std::declval<Iterator>() ) )
527  >
528  R sum( Unary unary_op = {} ) const
529  {
530  return this->accumulate(
531  R{ 0 },
532  std::plus< R >{},
533  unary_op
534  );
535  }
536 
537  template<
538  typename R2, typename C,
539  typename R = R2
540  >
541  R sum( R2 (C :: * pmf) () const ) const
542  {
543  return this->sum( std::mem_fn( pmf ) );
544  }
545 };
546 
547 template< typename Iterator>
549 make_iterator_range( const Iterator &i1, const Iterator &i2 )
550 {
551  return { i1, i2 };
552 }
553 
554 template< typename Container >
556 make_iterator_range( Container &container )
557 {
558  return { container.begin(), container.end() };
559 }
560 
561 template< typename Container >
563 make_iterator_range( const Container &container )
564 {
565  return { container.begin(), container.end() };
566 }
567 
568 // A utility function building a container of results
569 template< typename Container, typename Iterator, typename Function >
570 Container transform_range( Iterator first, Iterator last, Function &&fn )
571 {
572  Container result;
573  std::transform( first, last, std::back_inserter( result ), fn );
574  return result;
575 }
576 // A utility function, often constructing a vector from another vector
577 template< typename OutContainer, typename InContainer, typename Function >
578 OutContainer transform_container( InContainer &inContainer, Function &&fn )
579 {
580  return transform_range<OutContainer>(
581  inContainer.begin(), inContainer.end(), fn );
582 }
583 
585 
589 struct UTILITY_API alignas(
590 #ifdef __WIN32__
591  std::hardware_destructive_interference_size
592 #else
593  // That constant isn't defined for the other builds yet
594  64 /* ? */
595 #endif
596 )
597 
598 NonInterferingBase {
599  static void *operator new(std::size_t count, std::align_val_t al);
600  static void operator delete(void *ptr, std::align_val_t al);
601 
602 #if defined (_MSC_VER) && defined(_DEBUG)
603  // Versions that work in the presence of the DEBUG_NEW macro.
604  // Ignore the arguments supplied by the macro and forward to the
605  // other overloads.
606  static void *operator new(
607  std::size_t count, std::align_val_t al, int, const char *, int)
608  { return operator new(count, al); }
609  static void operator delete(
610  void *ptr, std::align_val_t al, int, const char *, int)
611  { return operator delete(ptr, al); }
612 #endif
613 };
614 
618 template< typename T > struct NonInterfering
619  : NonInterferingBase // Inherit operators; use empty base class optimization
620  , T
621 {
622  using T::T;
623 };
624 
625 // These macros are used widely, so declared here.
626 #define QUANTIZED_TIME(time, rate) (floor(((double)(time) * (rate)) + 0.5) / (rate))
627 // dB - linear amplitude conversions
628 #define DB_TO_LINEAR(x) (pow(10.0, (x) / 20.0))
629 #define LINEAR_TO_DB(x) (20.0 * log10(x))
630 
631 #define MAX_AUDIO (1. - 1./(1<<15))
632 
633 #endif // __AUDACITY_MEMORY_X_H__
IteratorRange::identity
Definition: MemoryX.h:442
transform_range
Container transform_range(Iterator first, Iterator last, Function &&fn)
Definition: MemoryX.h:570
Optional::emplace
X & emplace(Args &&... args)
Definition: MemoryX.h:193
IteratorRange::any_of
bool any_of(const F &f) const
Definition: MemoryX.h:435
Final_action::clean
F clean
Definition: MemoryX.h:304
Optional::Optional
Optional(const Optional &that)
Definition: MemoryX.h:153
Optional::Optional
Optional(Optional &&that)
Definition: MemoryX.h:170
valueRestorer
ValueRestorer< T > valueRestorer(T &var)
inline functions provide convenient parameter type deduction
Definition: MemoryX.h:354
ArraysOf::operator=
ArraysOf & operator=(ArraysOf &&that)
Definition: MemoryX.h:102
ArraysOf::ArraysOf
ArraysOf(Integral N)
Definition: MemoryX.h:86
make_iterator_range
IteratorRange< Iterator > make_iterator_range(const Iterator &i1, const Iterator &i2)
Definition: MemoryX.h:549
Optional
Like a smart pointer, allows for object to not exist (nullptr)
Definition: MemoryX.h:144
IteratorRange::max
R max(R2(C ::*pmf)() const) const
Definition: MemoryX.h:519
Optional::Optional
Optional()
Definition: MemoryX.h:150
fn
static const auto fn
Definition: WaveformView.cpp:1114
Final_action::Final_action
Final_action(F f)
Definition: MemoryX.h:302
ArraysOf::ArraysOf
ArraysOf()
Definition: MemoryX.h:83
ValueIterator
std::iterator< Category, const Value, ptrdiff_t, void, const Value > ValueIterator
A convenience for defining iterators that return rvalue types, so that they cooperate correctly with ...
Definition: MemoryX.h:372
CommandSignature
Class that maps parameter names to default values and validators.
Definition: CommandSignature.h:29
ArrayOf::reinit
void reinit(Integral count, bool initialize=false)
Definition: MemoryX.h:57
IteratorRange
A convenience for use with range-for.
Definition: MemoryX.h:378
alignas
struct UTILITY_API alignas(64) NonInterferingBase
Non-template helper for class template NonInterfering.
Definition: MemoryX.h:589
Optional::address
X * address()
Definition: MemoryX.h:239
MallocString
std::unique_ptr< Character[], freer > MallocString
Definition: MemoryX.h:274
Final_action
"finally" as in The C++ Programming Language, 4th ed., p. 358 Useful for defining ad-hoc RAII actions...
Definition: MemoryX.h:301
RestoreValue::oldValue
T oldValue
Definition: MemoryX.h:322
IteratorRange::rend
reverse_iterator rend() const
Definition: MemoryX.h:395
Optional::storage
char storage[sizeof(X)]
Definition: MemoryX.h:253
ArraysOf::reinit
void reinit(Integral1 countN, Integral2 countM, bool initialize=false)
Definition: MemoryX.h:121
Destroyer
A deleter class to supply the second template parameter of unique_ptr for classes like wxWindow that ...
Definition: MemoryX.h:282
transform_container
OutContainer transform_container(InContainer &inContainer, Function &&fn)
Definition: MemoryX.h:578
Optional::has_value
bool has_value() const
Definition: MemoryX.h:233
Optional::~Optional
~Optional()
Definition: MemoryX.h:203
IteratorRange::begin
Iterator begin() const
Definition: MemoryX.h:391
Optional::reset
void reset()
Definition: MemoryX.h:221
IteratorRange::min
R min(R2(C ::*pmf)() const) const
Definition: MemoryX.h:497
Optional::d
double d
Definition: MemoryX.h:252
IteratorRange::max
R max(Unary unary_op={}) const
Definition: MemoryX.h:506
ArraysOf::reinit
void reinit(Integral count)
Definition: MemoryX.h:109
IteratorRange::empty
bool empty() const
Definition: MemoryX.h:397
IteratorRange::iterator
Iterator iterator
Definition: MemoryX.h:379
ArrayOf::ArrayOf
ArrayOf()
Definition: MemoryX.h:29
IteratorRange::end
Iterator end() const
Definition: MemoryX.h:392
RestoreValue
Structure used by ValueRestorer.
Definition: MemoryX.h:321
ArraysOf::ArraysOf
ArraysOf(Integral1 N, Integral2 M, bool initialize=false)
Definition: MemoryX.h:91
ArraysOf
memory.h template class for making an array of arrays.
Definition: MemoryX.h:81
ArraysOf::reinit
void reinit(Integral count, bool initialize)
Definition: MemoryX.h:115
Destroyer::operator()
void operator()(T *p) const
Definition: MemoryX.h:283
RestoreValue::operator()
void operator()(T *p) const
Definition: MemoryX.h:323
IteratorRange::reverse_iterator
std::reverse_iterator< Iterator > reverse_iterator
Definition: MemoryX.h:380
ArrayOf::operator=
ArrayOf & operator=(ArrayOf &&that)
Definition: MemoryX.h:45
IteratorRange::identity::operator()
const T && operator()(T &&v) const
Definition: MemoryX.h:442
Optional::operator->
X * operator->() const
Definition: MemoryX.h:216
ValueRestorer::ValueRestorer
ValueRestorer(ValueRestorer &&that)
Definition: MemoryX.h:342
Optional::operator=
Optional & operator=(const Optional &that)
Definition: MemoryX.h:159
IteratorRange::index_if
long index_if(const F &f) const
Definition: MemoryX.h:418
ValueRestorer::ValueRestorer
ValueRestorer(T &var)
Definition: MemoryX.h:336
IteratorRange::all_of
bool all_of(const F &f) const
Definition: MemoryX.h:427
freer::operator()
void operator()(void *p) const
Definition: MemoryX.h:262
IteratorRange::find
iterator find(const T &t) const
Definition: MemoryX.h:401
IteratorRange::reversal
IteratorRange< reverse_iterator > reversal() const
Definition: MemoryX.h:388
IteratorRange::IteratorRange
IteratorRange(Iterator &&a, Iterator &&b)
Definition: MemoryX.h:385
IteratorRange::sum
R sum(R2(C ::*pmf)() const) const
Definition: MemoryX.h:541
MallocPtr
std::unique_ptr< T, freer > MallocPtr
Definition: MemoryX.h:268
ArrayOf::ArrayOf
ArrayOf(ArrayOf &&that)
Definition: MemoryX.h:40
freer
Definition: MemoryX.h:262
IteratorRange::accumulate
R accumulate(R init, Binary binary_op, R2(C ::*pmf)() const) const
Definition: MemoryX.h:470
NonInterfering
Definition: MemoryX.h:621
IteratorRange::rbegin
reverse_iterator rbegin() const
Definition: MemoryX.h:394
Final_action::~Final_action
~Final_action()
Definition: MemoryX.h:303
min
int min(int a, int b)
Definition: CompareAudioCommand.cpp:106
IteratorRange::contains
bool contains(const T &t) const
Definition: MemoryX.h:412
Optional::operator*
X & operator*() const
Dereference, with the usual bad consequences if NULL.
Definition: MemoryX.h:211
IteratorRange::min
R min(Unary unary_op={}) const
Definition: MemoryX.h:484
ValueRestorer
Set a variable temporarily in a scope.
Definition: MemoryX.h:332
IteratorRange::accumulate
R accumulate(R init, Binary binary_op={}, Unary unary_op={}) const
Definition: MemoryX.h:451
IteratorRange::size
size_t size() const
Definition: MemoryX.h:399
ValueRestorer::ValueRestorer
ValueRestorer(T &var, const T &newValue)
Definition: MemoryX.h:339
ArrayOf::ArrayOf
ArrayOf(const ArrayOf &)=delete
Optional::pp
X * pp
Definition: MemoryX.h:256
IteratorRange::sum
R sum(Unary unary_op={}) const
Definition: MemoryX.h:528
Destroy_ptr
std::unique_ptr< T, Destroyer< T > > Destroy_ptr
a convenience for using Destroyer
Definition: MemoryX.h:290
safenew
#define safenew
Definition: MemoryX.h:10
ArrayOf::ArrayOf
ArrayOf(Integral count, bool initialize=false)
Definition: MemoryX.h:32
IteratorRange::IteratorRange
IteratorRange(const Iterator &a, const Iterator &b)
Definition: MemoryX.h:382
IteratorRange::index
long index(const T &t) const
Definition: MemoryX.h:404
ArrayOf
Memory.h template class for making an array of float, bool, etc.
Definition: MemoryX.h:27
ArraysOf::ArraysOf
ArraysOf(const ArraysOf &)=delete
ValueRestorer::operator=
ValueRestorer & operator=(ValueRestorer &&that)
Definition: MemoryX.h:344
IteratorRange::find_if
iterator find_if(const F &f) const
Definition: MemoryX.h:415
IteratorRange::none_of
bool none_of(const F &f) const
Definition: MemoryX.h:438