Date: Fri, 29 Mar 2024 08:02:38 +0000 (UTC) Message-ID: <943990072.24945.1711699358227@ae5f4610bf64> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_24944_2125711072.1711699358227" ------=_Part_24944_2125711072.1711699358227 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Slice constant def= initions map to corresponding C++ constant definitions. For example:
const bool &nbs= p;AppendByDefault =3D true; const byte LowerNibble =3D&nbs= p;0x0f; const string Advice =3D "Don't P= anic!"; const short TheAnswer =3D 42; const double PI =3D 3.1416; enum Fruit { Apple, Pear, Orange }; const Fruit FavoriteFruit =3D P= ear;
Here are the generated definitions for these constants:
const bool = AppendByDefault =3D true; const Ice::Byte LowerNibble =3D = ; 15; const std::string Advice =3D &n= bsp; "Don't Panic!"; const Ice::Short TheAnswer =3D = 42; const Ice::Double PI =3D = 3.1416; enum Fruit { Apple, Pear, Orange }; const Fruit Favor= iteFruit =3D Pear;
All constants are initialized directly in the header file, so they are c=
ompile-time constants and can be used in contexts where a compile-time cons=
tant expression is required, such as to dimension an array or as the =
case
label of a switch
statement.