test castUnsafe w/ transform()

This commit is contained in:
Michael Davidsaver
2013-04-15 15:25:54 -04:00
parent 0e57391b4d
commit b0c57e7ae3

View File

@@ -7,6 +7,7 @@
#include <fstream>
#include <iostream>
#include <algorithm>
#include <limits>
#include <typeinfo>
#include <stddef.h>
@@ -136,7 +137,8 @@ int main(int argc,char *argv[])
typedef epics::pvData::String String_t;
// force all possibilities to be compiled
#define CHECK(M, N) x## M = ::epics::pvData::castUnsafe<M ##_t>(x## N)
#define CHECK(M, N) x## M = ::epics::pvData::castUnsafe<M ##_t>(x## N); \
std::transform(&x ## N, &x ## N+1, &x ## M, ::epics::pvData::castUnsafe<M ##_t,N ##_t>)
//#define CHECK(M, N) x## M = ::epics::pvData::detail::cast_helper<M ##_t,N ##_t>::op(x## N)
CHECK(int8, int8);
CHECK(int8, uint8);