A couple of days ago we’ve received our prototype board, which may be one of the first commercially sold evaluation kits for this chip. At first, I’ll briefly review the chip and the board, then we’ll discuss the internal design features and compare it with its predecessor, the NT1065.
UPDATE: Check out the hands-on review.
One of the things that I miss the most in the C++ is the ability to iterate over every single field in the POD (plain old data) structure. A basic example from the top of my head is when you need to preprocess the data, received with the different byte endianness (big vs little endian).
I was writing an article about adding
constexpr to some legacy code generation function when I found myself explaining one feature so detailed I decided to extract it into the separate article.
UPD: As Shafik Yaghmour has pointed out, the solution below is an undefined behaviour, due to the use of an inactive member of the union. Another solution is using the fact, that we are allowed by the standard to cast pointers to
char (std::int8_t) and
unsigned char (std::uint8_t). So we get rid of pointers, fill an array of bytes, reverse it and copy the data back to the user. Here’s the link to play with.