azure-sdk-for-cpp/sdk/storage
Sutou Kouhei 6cc8fc195f
Add support for building with ICU 75.1 or later (#6486)
* Add support for building with ICU 75.1 or later

We use ICU via libxml2 implicitly. ICU 75.1 or later require C++17 for
its C++ API:

https://github.com/unicode-org/icu/releases/tag/release-75-1

> C++ code now requires C++17

But we use C++17. So `#include <libxml/xmlreader.h>` with ICU 75.1 or
later causes an error:

    [1/177] Building CXX object sdk/storage/azure-storage-common/CMakeFiles/azure-storage-common.dir/src/xml_wrapper.cpp.o
    FAILED: sdk/storage/azure-storage-common/CMakeFiles/azure-storage-common.dir/src/xml_wrapper.cpp.o
    /bin/c++ -DAZ_RTTI -DBUILD_CURL_HTTP_TRANSPORT_ADAPTER -D_azure_BUILDING_SDK
    -Isdk/storage/azure-storage-common/inc -Isdk/core/azure-core/inc
    -isystem /usr/include/libxml2 -g -std=gnu++14 -fno-operator-names
    -Wold-style-cast -Wall -Wextra -pedantic -Werror -MD
    -MT sdk/storage/azure-storage-common/CMakeFiles/azure-storage-common.dir/src/xml_wrapper.cpp.o
    -MF sdk/storage/azure-storage-common/CMakeFiles/azure-storage-common.dir/src/xml_wrapper.cpp.o.d
    -o sdk/storage/azure-storage-common/CMakeFiles/azure-storage-common.dir/src/xml_wrapper.cpp.o
    -c sdk/storage/azure-storage-common/src/xml_wrapper.cpp
    In file included from /usr/include/unicode/uenum.h:25,
                     from /usr/include/unicode/ucnv.h:52,
                     from /usr/include/libxml2/libxml/encoding.h:31,
                     from /usr/include/libxml2/libxml/parser.h:812,
                     from /usr/include/libxml2/libxml/globals.h:18,
                     from /usr/include/libxml2/libxml/threads.h:35,
                     from /usr/include/libxml2/libxml/xmlmemory.h:218,
                     from /usr/include/libxml2/libxml/tree.h:1307,
                     from /usr/include/libxml2/libxml/xmlreader.h:14,
                     from sdk/storage/azure-storage-common/src/xml_wrapper.cpp:23:
    /usr/include/unicode/localpointer.h:561:26: error: 'auto' parameter not permitted in this context
      561 | template <typename Type, auto closeFunction>
          |                          ^~~~
    /usr/include/unicode/localpointer.h:573:76: error: template argument 2 is invalid
      573 |     explicit LocalOpenPointer(std::unique_ptr<Type, decltype(closeFunction)> &&p)
          |                                                                            ^
    /usr/include/unicode/localpointer.h:583:78: error: template argument 2 is invalid
      583 |     LocalOpenPointer &operator=(std::unique_ptr<Type, decltype(closeFunction)> &&p) {
          |                                                                              ^
    /usr/include/unicode/localpointer.h:599:59: error: template argument 2 is invalid
      599 |     operator std::unique_ptr<Type, decltype(closeFunction)> () && {
          |                                                           ^
    /usr/include/unicode/uenum.h:69:1: note: invalid template non-type parameter
       69 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUEnumerationPointer, UEnumeration, uenum_close);
          | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/unicode/ucnv.h:597:1: note: invalid template non-type parameter
      597 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUConverterPointer, UConverter, ucnv_close);
          | ^~~~~~~~~~~~~~~~~~~~~~~~~~~

We don't need ICU C++ API. So we can avoid this error by disabling ICU
C++ API by defining `U_SHOW_CPLUSPLUS_API` as `0`.

* Update CHANGELOG
2025-04-02 16:08:40 -07:00
..
azure-storage-blobs Use TokenCredential *const* everywhere (#6453) 2025-03-12 11:57:11 -07:00
azure-storage-common Add support for building with ICU 75.1 or later (#6486) 2025-04-02 16:08:40 -07:00
azure-storage-files-datalake Fix unstable test cases (#6485) 2025-03-27 09:53:29 -07:00
azure-storage-files-shares Use TokenCredential *const* everywhere (#6453) 2025-03-12 11:57:11 -07:00
azure-storage-queues Use TokenCredential *const* everywhere (#6453) 2025-03-12 11:57:11 -07:00
assets.json Storage STG97 Features (#6396) 2025-02-07 06:47:09 +00:00
ci.yml Switch to TME test subscription (#6093) 2024-10-14 11:05:46 -07:00
CMakeLists.txt
faq.md Fix typo in storage faq.md (#5139) 2023-11-10 04:42:13 +00:00
MigrationGuide.md Docs links coversion: docs.microsoft.com -> learn.microsoft.com (#6276) 2024-12-16 09:32:19 -08:00
README.md Move tests to use azure pipeline credentials (#5754) 2024-07-11 17:38:19 -07:00
test-resources-post.ps1
test-resources.json UseFederatedAuth storage test (#5810) 2024-07-20 02:00:18 +00:00
TestingGuide.md Storage/Add instruction for setting up storage accounts (#4917) 2023-09-05 14:01:49 +08:00

Azure Storage libraries for C++

Azure Storage is a Microsoft-managed service providing cloud storage that is highly available, secure, durable, scalable, and redundant. Azure Storage includes Blobs (objects), Queues, and Files.

  • Azure.Storage.Blobs is Microsoft's object storage solution for the cloud. Blob storage is optimized for storing massive amounts of unstructured data that does not adhere to a particular data model or definition, such as text or binary data.

  • Azure.Storage.Queues is a service for storing large numbers of messages. A queue message can be up to 64 KB in size and a queue may contain millions of messages, up to the total capacity limit of a storage account.

  • Azure.Storage.Files.Shares offers fully managed file shares in the cloud that are accessible via the industry standard Server Message Block (SMB) protocol. Azure file shares can be mounted concurrently by cloud or on-premises deployments of Windows, Linux, and macOS.

  • Azure.Storage.Files.DataLake includes all the capabilities required to make it easy for developers, data scientists, and analysts to store data of any size, shape, and speed, and do all types of processing and analytics across platforms and languages.

  • Azure.Storage.Common provides infrastructure shared by the other Azure Storage client libraries like shared key authentication and exceptions.

Contributing

See the C++ Contributing Guide for details on building, testing, and contributing to these libraries.

See the Storage Testing Guide for how to set up storage resources running unit tests.

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit cla.microsoft.com.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.