HP aC++/HP ANSI C A.06.28 Release (769149-001, March 2014)
Built-in macro __cpluspluss
The built-in macro __cplusplus now has a value of 201103L when the compiler is run in the C++11
mode (using the +std=c++11) option. Earlier, the value was 199711L irrespective of the mode of
execution.
Improved support for GNU extensions
This release of aC++ supports a host of GNU compiler extensions. For more details about these
features, see the GNU documentation available at http://gcc.gnu.org/onlinedocs/gcc/.
Binary literals
This release of the compiler supports ‘Binary literals’ under the GNU compilation mode. It allows
integer values using binary number system.
Example:
int main()
{
int i = 0b01;
return 0;
}
Better support for type trait pseudo functions
Various type trait pseudo-functions are supported in this release of aC++ in the GNU compilation
mode such as __has_nothrow_assign, __has_nothrow_constructor, __has_nothrow_copy,
__has_trivial_assign, __has_trivial_constructor, __has_trivial_copy, __has_trivial_destructor,
__is_abstract, __is_class, __is_convertible_to, __is_empty, __is_enum, __is_pod, __is_polymorphic
and __is_union.
All the above type trait pseudo-functions are now supported in the GNU C++ compilation mode
(-Ag++).
Better support for attributes
Various attributes are supported in this release of aC++ in the GNU compilation mode, such as
vector_size, transparent_union, gnu_inline, deprecated, weakref and alloc_size.
Better support for templates
When compiling in GNU C++ mode, the following features are now accepted in this release of
aC++:
Floating-point operations in template arguments
template <int xi> struct foo {};
foo< ( 3.1 < 2.3) > d;
Abstract class parameters in templates
struct A { virtual void p() = 0; };
struct B:A { virtual void p() {} };
template<typename T> void f(void (*)(T t)){}
int main()
{
f<A>(0); // Now elicits a warning instead of an error.
}
Pure specifier ("= 0") in templates
template<typename T> struct S
{
void f() = 0; // An error is issued if the template is instantiated.
New features in version A.06.27 19