StatusOr returns a value on success and a Status on error.
future and promise futures (a holder that will receive a value asynchronously) and promises (the counterpart of a future, where values are stored asynchronously). They satisfy the API for std::future and std::promise, and add support for callbacks and cancellation.
Warning:
Some namespaces are reserved for implementation details and are subject to change without notice. Do not use any symbols in these namespaces as your application may break when trying to use future versions of the library.
These namespaces include:
Any namespace with internal in its name, including google::cloud::internal and google::cloud::rest_internal.
Any namespace with testing in its name, including google::cloud::testing_util.
More information
Error Handling for more details about how the libraries report run-time errors and how you can handle them.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[[["\u003cp\u003eThis page documents the common components shared across Google Cloud C++ Client Libraries, including the latest release candidate (2.37.0-rc) and several previous versions, down to version 2.10.1.\u003c/p\u003e\n"],["\u003cp\u003eKey components include Credentials for authentication, Options for customizing default configurations, Status for error codes, and StatusOr for managing successful or failed operations.\u003c/p\u003e\n"],["\u003cp\u003eIt provides support for asynchronous operations through \u003ccode\u003efuture\u003c/code\u003e and \u003ccode\u003epromise\u003c/code\u003e constructs, enhancing the standard library with callbacks and cancellation features.\u003c/p\u003e\n"],["\u003cp\u003eUsers should avoid utilizing namespaces that include \u003ccode\u003einternal\u003c/code\u003e or \u003ccode\u003etesting\u003c/code\u003e in their names, as they are subject to change without notice and are intended for implementation details.\u003c/p\u003e\n"],["\u003cp\u003eThe page contains additional resources about Error Handling, Client Library Configuration, Authentication Components, and Logging Components, allowing users to dive deeper into these topics.\u003c/p\u003e\n"]]],[],null,["Version 2.10.1keyboard_arrow_down\n\n- [2.42.0-rc (latest)](/cpp/docs/reference/common/latest)\n- [2.41.0](/cpp/docs/reference/common/2.41.0)\n- [2.40.0](/cpp/docs/reference/common/2.40.0)\n- [2.39.0](/cpp/docs/reference/common/2.39.0)\n- [2.38.0](/cpp/docs/reference/common/2.38.0)\n- [2.37.0](/cpp/docs/reference/common/2.37.0)\n- [2.36.0](/cpp/docs/reference/common/2.36.0)\n- [2.35.0](/cpp/docs/reference/common/2.35.0)\n- [2.34.0](/cpp/docs/reference/common/2.34.0)\n- [2.33.0](/cpp/docs/reference/common/2.33.0)\n- [2.32.0](/cpp/docs/reference/common/2.32.0)\n- [2.31.0](/cpp/docs/reference/common/2.31.0)\n- [2.30.0](/cpp/docs/reference/common/2.30.0)\n- [2.29.0](/cpp/docs/reference/common/2.29.0)\n- [2.28.0](/cpp/docs/reference/common/2.28.0)\n- [2.27.0](/cpp/docs/reference/common/2.27.0)\n- [2.26.0](/cpp/docs/reference/common/2.26.0)\n- [2.25.1](/cpp/docs/reference/common/2.25.1)\n- [2.24.0](/cpp/docs/reference/common/2.24.0)\n- [2.23.0](/cpp/docs/reference/common/2.23.0)\n- [2.22.1](/cpp/docs/reference/common/2.22.1)\n- [2.21.0](/cpp/docs/reference/common/2.21.0)\n- [2.20.0](/cpp/docs/reference/common/2.20.0)\n- [2.19.0](/cpp/docs/reference/common/2.19.0)\n- [2.18.0](/cpp/docs/reference/common/2.18.0)\n- [2.17.0](/cpp/docs/reference/common/2.17.0)\n- [2.16.0](/cpp/docs/reference/common/2.16.0)\n- [2.15.1](/cpp/docs/reference/common/2.15.1)\n- [2.14.0](/cpp/docs/reference/common/2.14.0)\n- [2.13.0](/cpp/docs/reference/common/2.13.0)\n- [2.12.0](/cpp/docs/reference/common/2.12.0)\n- [2.11.0](/cpp/docs/reference/common/2.11.0)\n- [2.10.1](/cpp/docs/reference/common/2.10.1) \n\nCommon Components for the Google Cloud C++ Client Libraries\n===========================================================\n\nOverview\n--------\n\nThis library contains common components shared by all the Google Cloud C++ Client Libraries. Including:\n\n- [Credentials](/cpp/docs/reference/common/2.10.1/classgoogle_1_1cloud_1_1Credentials) are used to configure authentication in the client libraries. See [Authentication Components](/cpp/docs/reference/common/2.10.1/group__guac) for more details on authentication.\n- [Options](/cpp/docs/reference/common/2.10.1/classgoogle_1_1cloud_1_1Options) are used to override the client library default configuration. See [Client Library Configuration](/cpp/docs/reference/common/2.10.1/group__options) for more details on library configuration.\n- [Status](/cpp/docs/reference/common/2.10.1/classgoogle_1_1cloud_1_1Status) error codes and details from an operation.\n- [StatusOr](/cpp/docs/reference/common/2.10.1/classgoogle_1_1cloud_1_1StatusOr) returns a value on success and a `Status` on error.\n- [future](/cpp/docs/reference/common/2.10.1/classgoogle_1_1cloud_1_1future) and [promise](/cpp/docs/reference/common/2.10.1/classgoogle_1_1cloud_1_1promise) futures (a holder that will receive a value asynchronously) and promises (the counterpart of a future, where values are stored asynchronously). They satisfy the API for `std::future` and `std::promise`, and add support for callbacks and cancellation.\n\n\u003e **Warning:**\n\u003e\n\u003e Some namespaces are reserved for implementation details and are subject to change without notice. Do not use any symbols in these namespaces as your application may break when trying to use future versions of the library.\n\u003e These namespaces include:\n\u003e\n\u003e - Any namespace with `internal` in its name, including `google::cloud::internal` and `google::cloud::rest_internal`.\n\u003e - Any namespace with `testing` in its name, including `google::cloud::testing_util`.\n\n### More information\n\n- [Error Handling](/cpp/docs/reference/common/2.10.1/common-error-handling) for more details about how the libraries report run-time errors and how you can handle them.\n- [Client Library Configuration](/cpp/docs/reference/common/2.10.1/group__options) for information about configuring the client libraries at runtime.\n- [Authentication Components](/cpp/docs/reference/common/2.10.1/group__guac) for more details about how to configure authentication in the client libraries.\n- [Logging Components](/cpp/docs/reference/common/2.10.1/logging) for information about enabling logging to the console in the client libraries."]]