35 #ifndef _BLAZE_UTIL_UNIQUEARRAY_H_
36 #define _BLAZE_UTIL_UNIQUEARRAY_H_
96 ,
typename D = ArrayDelete >
123 inline Reference
operator[](
size_t index )
const ;
130 inline Pointer
get()
const ;
132 inline void reset( Pointer ptr = NULL ) ;
140 inline operator bool() const ;
179 , deleter_( Deleter() )
323 return (
ptr_ != NULL );
339 template<
typename T1,
typename D1,
typename T2,
typename D2 >
342 template<
typename T1,
typename D1,
typename T2,
typename D2 >
345 template<
typename T1,
typename D1,
typename T2,
typename D2 >
346 inline bool operator<( const UniqueArray<T1,D1>& lhs,
const UniqueArray<T2,D2>& rhs );
348 template<
typename T1,
typename D1,
typename T2,
typename D2 >
349 inline bool operator<=( const UniqueArray<T1,D1>& lhs,
const UniqueArray<T2,D2>& rhs );
351 template<
typename T1,
typename D1,
typename T2,
typename D2 >
354 template<
typename T1,
typename D1,
typename T2,
typename D2 >
357 template<
typename T,
typename D >
360 template<
typename T,
typename D >
363 template<
typename T,
typename D >
364 inline bool operator<( const UniqueArray<T,D>& ptr,
const Null& null );
366 template<
typename T,
typename D >
369 template<
typename T,
typename D >
370 inline bool operator<=( const UniqueArray<T,D>& ptr,
const Null& null );
372 template<
typename T,
typename D >
375 template<
typename T,
typename D >
378 template<
typename T,
typename D >
381 template<
typename T,
typename D >
382 inline bool operator<( const Null& null, const UniqueArray<T,D>& ptr );
384 template<
typename T,
typename D >
387 template<
typename T,
typename D >
388 inline bool operator<=( const Null& null, const UniqueArray<T,D>& ptr );
390 template<
typename T,
typename D >
393 template<
typename T,
typename D >
406 template<
typename T1
412 return lhs.
get() == rhs.
get();
424 template<
typename T1
430 return lhs.
get() != rhs.
get();
442 template<
typename T1
448 return lhs.
get() < rhs.get();
460 template<
typename T1
478 template<
typename T1
484 return !( rhs < lhs );
496 template<
typename T1
502 return !( lhs < rhs );
518 return ptr.
get() == null;
534 return !( ptr == null );
548 inline bool operator<( const UniqueArray<T,D>& ptr,
const Null& null )
550 return ptr.get() < null;
566 return ptr.
get() > null;
580 inline bool operator<=( const UniqueArray<T,D>& ptr,
const Null& null )
582 return !( ptr > null );
598 return !( ptr < null );
644 inline bool operator<( const Null& null, const UniqueArray<T,D>& ptr )
676 inline bool operator<=( const Null& null, const UniqueArray<T,D>& ptr )
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_USER_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERT flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:117
Header file for basic type definitions.
RemoveReference< T >::Type & Reference
Reference type of the managed array elements.
Definition: UniqueArray.h:102
RemoveReference< T >::Type * Pointer
Pointer type of the managed array elements.
Definition: UniqueArray.h:101
UniqueArray(Pointer ptr=NULL)
The default constructor for the UniqueArray specialization.
Definition: UniqueArray.h:177
Pointer get() const
Returns a pointer to the managed array.
Definition: UniqueArray.h:245
Base class for non-copyable class instances.
bool operator>(const NegativeAccuracy< A > &lhs, const T &rhs)
Greater-than comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:366
bool operator>=(const NegativeAccuracy< A > &, const T &rhs)
Greater-or-equal-than comparison between a NegativeAccuracy object and a floating point value...
Definition: Accuracy.h:442
Safe C++ NULL pointer implementation.This implementation offers a remedy for the use of the NULL poin...
Definition: Null.h:69
Constraint on the data type.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Deleter deleter_
Resource deleter.
Definition: UniqueArray.h:149
void reset(Pointer ptr=NULL)
Resets the unique array and replaces the managed array with the given array.
Definition: UniqueArray.h:279
Base class for non-copyable class instances.The NonCopyable class is intended to work as a base class...
Definition: NonCopyable.h:63
Pointer release()
Releases the ownership of the managed array to the caller.
Definition: UniqueArray.h:262
~UniqueArray()
The destructor for the UniqueArray specialization.
Definition: UniqueArray.h:197
#define BLAZE_CONSTRAINT_MUST_NOT_BE_ARRAY_TYPE(T)
Constraint on the data type.In case the given data type T is an array type, a compilation error is cr...
Definition: Array.h:116
Removal of reference modifiers.The RemoveCV type trait removes any reference modifiers from the given...
Definition: RemoveReference.h:69
D Deleter
Type of the resource deleter.
Definition: UniqueArray.h:103
Header file for run time assertion macros.
Pointer ptr_
Pointer to the managed array.
Definition: UniqueArray.h:148
Header file for the RemoveReference type trait.
Reference operator[](size_t index) const
Direct access to the array elements.
Definition: UniqueArray.h:219
bool operator==(const NegativeAccuracy< A > &lhs, const T &rhs)
Equality comparison between a NegativeAccuracy object and a floating point value. ...
Definition: Accuracy.h:249
bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:289
Header file for the ArrayDelete policy classes.
void swap(UniqueArray &up)
Swapping the contents of two unique arrays.
Definition: UniqueArray.h:297
Scope-limited management of dynamically allocated arrays.The UniqueArray class implements a scope-res...
Definition: UniqueArray.h:97
Header file for a safe C++ NULL pointer implementation.