zhjwpku commented on code in PR #936:
URL: https://github.com/apache/iceberg-cpp/pull/936#discussion_r4122976410


##########
src/iceberg/expected.h:
##########
@@ -0,0 +1,2443 @@
+/*
+ * MIT License
+ *
+ * Copyright (c) 2024 zeus-cpp
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to 
deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in 
all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
THE
+ * SOFTWARE.
+ */
+
+/// \file iceberg/expected.h
+/// \brief A C++20 backport of C++23 `std::expected`, used as the storage type
+/// behind `iceberg::Result`.
+///
+/// Purpose: the library itself may be built as C++23, but its public headers
+/// must stay consumable from C++20 translation units. `std::expected` is a
+/// C++23 library feature, so `iceberg::Result<T>` (see iceberg/result.h) is
+/// defined in terms of `iceberg::expected` instead. The API mirrors
+/// `std::expected` (including the monadic `and_then`, `or_else`, `transform`
+/// and `transform_error`), so code can be written as if against the standard
+/// type.
+///
+/// History:
+/// - apache/iceberg-cpp#40 vendored this header, adapted from
+///   https://github.com/zeus-cpp/expected (MIT), while the project targeted

Review Comment:
   I think we can pin the latest v1.4.0, no need to stick to v1.2.0.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to