HP aC++/HP C A.06.25 Release Notes

Table Of Contents
a lambda function typically encloses the runtime state or environment of the declaring
function, being therefore able to access the local variables of the current function.
The way these variables are accessed can be controlled using either the '&' in a lambda
capture list ([&]), in which case the variables are passed by reference; by using a '='
([=]), whereby the variables are simply copied (analogous to call-by-value); or a
combination of the two.
Example:
int main() {
auto lambda = [] { printf("Lambda at work!"); };
lambda();
}
C99 features added to C++0x (New)
The following C99 features have been added to the C++0x standard and are available
when compiling in C++0x mode:
Mixed string literal concatenations
In C++0x mode and in default C++ mode, aC++ now accepts string literal concatenations
involving an ordinary char string literal and a wide string literal.
For example:
wchar_t *str1 = L"a" "b"; // Okay, same as L"ab".
wchar_t *str2 = "a" L"b"; // Okay, same as L"ab"
Such constructs were already accepted in C99 and GNU modes.
Rule changes related to determining the type of large literal constants
As in C99, unsuffixed integer literals that do not fit in type long, but can fit in type
unsigned long, are given type long long instead. This might cause certain
expressions to differ in values in C++0x and default C++ compilation modes.
Example for +DD32:
bool b = 4000000000 > -1; // b = true in C++0x mode.
// b = false in default C++ mode with long long enabled.
// (In that case, a warning is issued on the conversion of -1
// to an unsigned type.)
For +DD64, both modes are the same for that literal value.
Variadic macros
With this release, aC++ now accepts C99-style variadic macros in C++0x mode.
Like C99, the special identifier __VA_ARGS__ represents the set of all the arguments
passed to the macro just as they are passed in the variable arguments mechanism for
functions.
Example:
14 What’s New in This Version