Closed
Description
This can sometimes be useful if you are writing templates against the value code, e.g. something like this.
namespace cpp11 {
template <typename T> struct na {};
template <> struct na<double> { const static double value; };
const double na<double>::value = NA_REAL;
template <> struct na<int> { const static int value; };
// NA_INTEGER
template <> struct na<r_bool> { const static r_bool value; };
// NA_LOGICAL
template <> struct na<r_string> { const static r_string value; };
// NA_STRING
}
Metadata
Metadata
Assignees
Labels
No labels