Skip to content

Please provide an integer version of the VERSION_STRING macro #759

@edolstra

Description

@edolstra

The header file aws/core/VersionConfig.h exports a single macro named AWS_SDK_VERSION_STRING with a string value (e.g. "1.3.22"). However, such a string value is hard to use in proprocessor version checks. It would be great if the library had either a componentized version of the version, e.g.

#define AWS_SDK_VERSION_MAJOR 1
#define AWS_SDK_VERSION_MINOR 3
#define AWS_SDK_VERSION_PATCH 22

or a single monotonically increasing number, e.g.

#define AWS_SDK_VERSION 0100030022

The use case is that we sometimes need to support building against different versions of aws-sdk-cpp, so to deal with source level incompatibilities it would be great if we could write stuff like:

#if AWS_SDK_VERSION > 0100030000
  std::make_shared<S3Client>(..., ..., false, false)
#else
  std::make_shared<S3Client>(..., ..., Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy::Never, false)
#endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestA feature should be added or improved.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions