CXXR (C++ R) API
Public Member Functions
CXXR::ElementTraits::NAFunc< T > Struct Template Reference

Function object to generate 'not available' value. More...

#include <ElementTraits.hpp>

List of all members.

Public Member Functions

const T & operator() () const
 Value to be used if 'not available'.

Detailed Description

template<typename T>
struct CXXR::ElementTraits::NAFunc< T >

Function object to generate 'not available' value.

Normally this will be accessed via the NA() function template declared at CXXR namespace level.

Template Parameters:
TA type capable of being used as the element type of an R data vector.

Member Function Documentation

template<typename T >
const T& CXXR::ElementTraits::NAFunc< T >::operator() ( ) const

Value to be used if 'not available'.

Returns:
The value of type T to be used if the actual value is not available. This for example is the value that will be used if an element of a vector of T is accessed in R using a NA index.
Note:
For some types, e.g. Rbyte, the value returned is not distinct from ordinary values of the type. See hasDistinctNA().

The documentation for this struct was generated from the following file: