diff --git a/.github/.licenserc.yaml b/.github/.licenserc.yaml index 75545a5a0..c657a031d 100644 --- a/.github/.licenserc.yaml +++ b/.github/.licenserc.yaml @@ -11,5 +11,6 @@ header: - '.github/**' - 'LICENSE' - 'NOTICE' + - 'src/iceberg/expected.h' comment: on-failure diff --git a/.github/workflows/cpp-linter.yml b/.github/workflows/cpp-linter.yml index cc1055537..da58dca94 100644 --- a/.github/workflows/cpp-linter.yml +++ b/.github/workflows/cpp-linter.yml @@ -44,6 +44,7 @@ jobs: with: style: file tidy-checks: '' + version: 19 files-changed-only: true lines-changed-only: true thread-comments: true diff --git a/LICENSE b/LICENSE index 261eeb9e9..1c8702596 100644 --- a/LICENSE +++ b/LICENSE @@ -199,3 +199,31 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + +-------------------------------------------------------------------------------- + +The file src/iceberg/expected.h contains code adapted from + +https://github.com/zeus-cpp/expected + +with the following license (MIT) + +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. diff --git a/NOTICE b/NOTICE index e466e8c1d..c71e81d44 100644 --- a/NOTICE +++ b/NOTICE @@ -3,3 +3,7 @@ Copyright 2024-2025 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). + +This product includes code from zeus-cpp + * Copyright (c) 2024 zeus-cpp + * https://github.com/zeus-cpp/expected diff --git a/src/iceberg/expected.h b/src/iceberg/expected.h new file mode 100644 index 000000000..9d28d3815 --- /dev/null +++ b/src/iceberg/expected.h @@ -0,0 +1,2359 @@ +/* + * 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. + */ + +#pragma once + +#include +#include +#include +#include + +#include "iceberg/iceberg_export.h" + +// NOLINTBEGIN + +namespace iceberg { + +namespace expected_detail { + +template class Template> +inline constexpr bool is_specialization_v = + false; // true if and only if T is a specialization of Template +template