Wording changes are made to the Standard to make clear that the interfacing
capabilities of section B.3 apply to the C-subset of C++ as well.

!question

Which provisions does Ada offer to interface with C++ ?

!recommendation

(See wording.)

!wording

Change the title of section B.3 to read "Interfacing with C and C++"

Change B.3(1-2) to read:

The facilities relevant to interfacing with the C language and the
corresponding subset of the C++ language are the package Interfaces.C
and its children, and support for the Import, Export, and Convention
pragmas with convention_identifier C; and support for the Convention
pragma with convention_identifier C_Pass_By_Copy.

The package Interfaces.C contains the basic types, constants and
subprograms that allow an Ada program to pass scalars and strings to C
and C++ functions. When this clause mentions a C entity, the reference
also applies to the same entity in C++.

Add the following after 1.2(8/1):

ISO/IEC 14882:2003, Programming languages - C++

!discussion

The facilities provided for C work equally well for C++.
Admittedly, a truly convenient interfacing with C++ would also entail
interfacing with the object-oriented elements of C++. However,
specifying standardized interfaces for this capability in a
compiler-independent fashion is deemed too difficult.

Note that if we normatively talk about C++, we need a reference to its
standard in 1.2.

The facilities relevant to interfacing with the C language are the package
Interfaces.C and its children; support for the Import, Export, and Convention
pragmas with convention_identifier C; and support for the Convention
pragma with convention_identifier C_Pass_By_Copy.

by:

The facilities relevant to interfacing with the C language and the
corresponding subset of the C++ language are the package
Interfaces.C and its children; support for the Import, Export, and Convention
pragmas with convention_identifier C; and support for the Convention
pragma with convention_identifier C_Pass_By_Copy.

!corrigendum B.3(2)

Replace the paragraph:

The package Interfaces.C contains the basic types, constants and subprograms
that allow an Ada program to pass scalars and strings to C functions.

by:

The package Interfaces.C contains the basic types, constants and subprograms
that allow an Ada program to pass scalars and strings to C and C++ functions.
When this clause mentions a C entity, the reference also applies to the same
entity in C++.

!ACATS test

There is no functional change to the language here, so further tests are not
needed.