From 416ec70bd1e9da43702b29f4c01a231d22c2069d Mon Sep 17 00:00:00 2001 From: Darius Neatu Date: Sun, 23 Jun 2024 10:25:59 +0300 Subject: [PATCH] Apply Standard [FILE.LICENCE_ID] rule --- CMakeLists.txt | 3 +++ Makefile | 3 ++- README.md | 5 +++++ cmake/Config.cmake.in | 3 +++ examples/CMakeLists.txt | 3 +++ examples/README.md | 19 +++++++++++++++++++ examples/optional_ref.cpp | 3 +++ examples/range_loop.cpp | 3 +++ examples/sample.cpp | 3 +++ extern/CMakeLists.txt | 3 +++ include/Beman/Optional26/detail/iterator.hpp | 4 +++- .../detail/stl_interfaces/config.hpp | 3 ++- .../Optional26/detail/stl_interfaces/fwd.hpp | 3 ++- .../stl_interfaces/iterator_interface.hpp | 1 + include/Beman/Optional26/optional.hpp | 4 +++- papers/P2988/README.md | 4 ++++ src/Beman/CMakeLists.txt | 3 +++ src/Beman/Optional26/CMakeLists.txt | 3 +++ src/Beman/Optional26/detail/iterator.cpp | 3 +++ src/Beman/Optional26/optional.cpp | 3 +++ .../Optional26/tests/detail/iterator.t.cpp | 3 +++ src/Beman/Optional26/tests/optional.t.cpp | 3 +++ .../Optional26/tests/optional_monadic.t.cpp | 3 +++ .../tests/optional_range_support.t.cpp | 3 +++ src/Beman/Optional26/tests/optional_ref.t.cpp | 3 +++ .../tests/optional_ref_monadic.t.cpp | 3 +++ src/Beman/Optional26/tests/test_types.hpp | 3 +++ src/CMakeLists.txt | 3 +++ 28 files changed, 98 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 76788888..7de1a05b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,6 @@ +# /CMakeLists.txt -*-makefile-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + cmake_minimum_required(VERSION 3.10) project(beman_optional26 VERSION 0.0.0 LANGUAGES CXX) diff --git a/Makefile b/Makefile index b7083a8f..f675d76b 100755 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ #! /usr/bin/make -f -# -*-makefile-*- +# /Makefile -*-makefile-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception INSTALL_PREFIX?=.install/ PROJECT?=$(shell basename $(CURDIR)) diff --git a/README.md b/README.md index f2c77a56..bc14931e 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,16 @@ # Beman.Optional26: C++26 Extensions for std::optional + + This implementation incorporates the C++26 extensions added for `std::optional`. The `Beman.Optional26` library aims to evaluate the stability, the usability, and the performance of these proposed changes before they are officially adopted by WG21 into the C++ Working Draft. Additionally, it allows developers to use these new features before they are implemented in major standard library compilers. **Implements**: * [`std::optional` (P2988R5)](https://wg21.link/P2988R5) * [Give *std::optional* Range Support (P3168R1)](https://wg21.link/P3168R1). +## License Source is licensed with the Apache 2.0 license with LLVM exceptions diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in index 38bbde7b..050aedbf 100644 --- a/cmake/Config.cmake.in +++ b/cmake/Config.cmake.in @@ -1,3 +1,6 @@ +# cmake/Config.cmake.in -*-makefile-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + @PACKAGE_INIT@ include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake") diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index aff0f99f..a51b12cf 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,3 +1,6 @@ +# examples/CMakeLists.txt -*-makefile-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + set(BEMAN_OPTIONAL26_LIBRARY "beman_optional26") include(GNUInstallDirs) diff --git a/examples/README.md b/examples/README.md index b43db0be..89c8f17e 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,7 +1,26 @@ # Beman.Optional26 Examples + + List of usage examples for `Beman.Optional26`. +## License +Source is licensed with the Apache 2.0 license with LLVM exceptions + +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +Documentation and associated papers are licensed with the Creative Commons Attribution 4.0 International license. + +// SPDX-License-Identifier: CC-BY-4.0 + +The intent is that the source and documentation are available for use by people implementing their own optional types as well as people using the optional presented here as-is. + +The README itself is licesed with CC0 1.0 Universal. Copy the contents and incorporate in your own work as you see fit. + +// SPDX-License-Identifier: CC0-1.0 + ## Sample Check [sample](sample.cpp) for basic `Beman.Optional26` library usage. diff --git a/examples/optional_ref.cpp b/examples/optional_ref.cpp index aaa25dfc..a5c7ae7d 100644 --- a/examples/optional_ref.cpp +++ b/examples/optional_ref.cpp @@ -1,3 +1,6 @@ +// examples/optional_ref.cpp -*-C++-*- +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + #include #include diff --git a/examples/range_loop.cpp b/examples/range_loop.cpp index 27a827a2..c64aabbf 100644 --- a/examples/range_loop.cpp +++ b/examples/range_loop.cpp @@ -1,3 +1,6 @@ +// examples/range_loop.cpp -*-C++-*- +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + #include #include diff --git a/examples/sample.cpp b/examples/sample.cpp index 3d3499bb..927b4181 100644 --- a/examples/sample.cpp +++ b/examples/sample.cpp @@ -1,3 +1,6 @@ +// examples/sample.cpp -*-C++-*- +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + #include #include diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index a2177fb3..d9c9f462 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -1 +1,4 @@ +# extern/CMakeLists.txt -*-makefile-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + add_subdirectory(googletest EXCLUDE_FROM_ALL) diff --git a/include/Beman/Optional26/detail/iterator.hpp b/include/Beman/Optional26/detail/iterator.hpp index c18b3842..35418d83 100644 --- a/include/Beman/Optional26/detail/iterator.hpp +++ b/include/Beman/Optional26/detail/iterator.hpp @@ -1,4 +1,6 @@ -// include/Beman/Optional26/detail/iterator.hpp -*-C++-*- +// include/Beman/Optional26/detail/iterator.hpp -*-C++-*- +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + #ifndef BEMAN_OPTIONAL26_DETAIL_ITERATOR_HPP #define BEMAN_OPTIONAL26_DETAIL_ITERATOR_HPP diff --git a/include/Beman/Optional26/detail/stl_interfaces/config.hpp b/include/Beman/Optional26/detail/stl_interfaces/config.hpp index 49a1bf40..e48ac01f 100644 --- a/include/Beman/Optional26/detail/stl_interfaces/config.hpp +++ b/include/Beman/Optional26/detail/stl_interfaces/config.hpp @@ -1,4 +1,5 @@ -// include/Beman/Optional26/detail/stl_interfaces/config.hpp -*-C++-*- +// include/Beman/Optional26/detail/stl_interfaces/config.hpp -*-C++-*- +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // Copyright (C) 2020 T. Zachary Laine // diff --git a/include/Beman/Optional26/detail/stl_interfaces/fwd.hpp b/include/Beman/Optional26/detail/stl_interfaces/fwd.hpp index 40b0ed52..4a4841dd 100644 --- a/include/Beman/Optional26/detail/stl_interfaces/fwd.hpp +++ b/include/Beman/Optional26/detail/stl_interfaces/fwd.hpp @@ -1,4 +1,5 @@ -// include/Beman/Optional26/detail/stl_interfaces/fwd.hpp -*-C++-*- +// include/Beman/Optional26/detail/stl_interfaces/fwd.hpp -*-C++-*- +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // Copyright (C) 2019 T. Zachary Laine // diff --git a/include/Beman/Optional26/detail/stl_interfaces/iterator_interface.hpp b/include/Beman/Optional26/detail/stl_interfaces/iterator_interface.hpp index 6aedcf00..5421c0e7 100644 --- a/include/Beman/Optional26/detail/stl_interfaces/iterator_interface.hpp +++ b/include/Beman/Optional26/detail/stl_interfaces/iterator_interface.hpp @@ -1,4 +1,5 @@ // include/Beman/Optional26/detail/stl_interfaces/iterator_interface.hpp -*-C++-*- +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // Copyright (C) 2019 T. Zachary Laine // diff --git a/include/Beman/Optional26/optional.hpp b/include/Beman/Optional26/optional.hpp index 2fcde95f..693a1e7a 100644 --- a/include/Beman/Optional26/optional.hpp +++ b/include/Beman/Optional26/optional.hpp @@ -1,4 +1,6 @@ -// include/Beman/Optional26/optional.hpp -*-C++-*- +// include/Beman/Optional26/optional.hpp -*-C++-*- +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + #ifndef BEMAN_OPTIONAL26_OPTIONAL_HPP #define BEMAN_OPTIONAL26_OPTIONAL_HPP diff --git a/papers/P2988/README.md b/papers/P2988/README.md index a91cd07e..b328d7c2 100644 --- a/papers/P2988/README.md +++ b/papers/P2988/README.md @@ -1,5 +1,9 @@ # P2988 + + ## Building P2988 Compiling the paper requires a working LaTeX installation. See instructions for configuring your system at [C++ Standard Draft Sources](https://github.com/cplusplus/draft/blob/main/README.rst) diff --git a/src/Beman/CMakeLists.txt b/src/Beman/CMakeLists.txt index ade4beba..cd84ac80 100644 --- a/src/Beman/CMakeLists.txt +++ b/src/Beman/CMakeLists.txt @@ -1 +1,4 @@ +# src/Beman/CMakeLists.txt -*-makefile-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + add_subdirectory(Optional26) diff --git a/src/Beman/Optional26/CMakeLists.txt b/src/Beman/Optional26/CMakeLists.txt index c8f10112..9e2fe392 100644 --- a/src/Beman/Optional26/CMakeLists.txt +++ b/src/Beman/Optional26/CMakeLists.txt @@ -1,3 +1,6 @@ +# src/Beman/Optional26/CMakeLists.txt -*-makefile-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + set(TARGET_LIBRARY "beman_optional26") add_library("${TARGET_LIBRARY}" STATIC "") diff --git a/src/Beman/Optional26/detail/iterator.cpp b/src/Beman/Optional26/detail/iterator.cpp index ce1839a1..c43fa9e0 100644 --- a/src/Beman/Optional26/detail/iterator.cpp +++ b/src/Beman/Optional26/detail/iterator.cpp @@ -1 +1,4 @@ +// src/Beman/Optional26/detail/iterator.cpp -*-C++-*- +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + #include diff --git a/src/Beman/Optional26/optional.cpp b/src/Beman/Optional26/optional.cpp index f9a0eeb8..90cadcac 100644 --- a/src/Beman/Optional26/optional.cpp +++ b/src/Beman/Optional26/optional.cpp @@ -1 +1,4 @@ +// src/Beman/Optional26/optional.cpp -*-C++-*- +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + #include diff --git a/src/Beman/Optional26/tests/detail/iterator.t.cpp b/src/Beman/Optional26/tests/detail/iterator.t.cpp index 8f2231e9..191db001 100644 --- a/src/Beman/Optional26/tests/detail/iterator.t.cpp +++ b/src/Beman/Optional26/tests/detail/iterator.t.cpp @@ -1,3 +1,6 @@ +// src/Beman/Optional26/tests/detail/iterator.t.cpp -*-C++-*- +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + /** * This file contains tests for beman::optional::detail::contiguous_iterator. */ diff --git a/src/Beman/Optional26/tests/optional.t.cpp b/src/Beman/Optional26/tests/optional.t.cpp index e29ff4ea..19f05a8a 100644 --- a/src/Beman/Optional26/tests/optional.t.cpp +++ b/src/Beman/Optional26/tests/optional.t.cpp @@ -1,3 +1,6 @@ +// src/Beman/Optional26/tests/optional.t.cpp -*-C++-*- +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + #include #include // test 2nd include OK diff --git a/src/Beman/Optional26/tests/optional_monadic.t.cpp b/src/Beman/Optional26/tests/optional_monadic.t.cpp index 79a1c6a7..9b8a5eba 100644 --- a/src/Beman/Optional26/tests/optional_monadic.t.cpp +++ b/src/Beman/Optional26/tests/optional_monadic.t.cpp @@ -1,3 +1,6 @@ +// src/Beman/Optional26/tests/optional_monadic.t.cpp -*-C++-*- +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + #include #include diff --git a/src/Beman/Optional26/tests/optional_range_support.t.cpp b/src/Beman/Optional26/tests/optional_range_support.t.cpp index b89860de..711a6184 100644 --- a/src/Beman/Optional26/tests/optional_range_support.t.cpp +++ b/src/Beman/Optional26/tests/optional_range_support.t.cpp @@ -1,3 +1,6 @@ +// src/Beman/Optional26/tests/optional_range_support.t.cpp -*-C++-*- +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + /** * This file contains tests for the range support. Check P3168R1: "Give std::optional Range Support". * diff --git a/src/Beman/Optional26/tests/optional_ref.t.cpp b/src/Beman/Optional26/tests/optional_ref.t.cpp index 3591256b..ed29b676 100644 --- a/src/Beman/Optional26/tests/optional_ref.t.cpp +++ b/src/Beman/Optional26/tests/optional_ref.t.cpp @@ -1,3 +1,6 @@ +// src/Beman/Optional26/tests/optional_ref.t.cpp -*-C++-*- +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + #include #include diff --git a/src/Beman/Optional26/tests/optional_ref_monadic.t.cpp b/src/Beman/Optional26/tests/optional_ref_monadic.t.cpp index 9d9f9fda..5a8bac7b 100644 --- a/src/Beman/Optional26/tests/optional_ref_monadic.t.cpp +++ b/src/Beman/Optional26/tests/optional_ref_monadic.t.cpp @@ -1,3 +1,6 @@ +// src/Beman/Optional26/tests/optional_ref_monadic.t.cpp -*-C++-*- +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + #include #include diff --git a/src/Beman/Optional26/tests/test_types.hpp b/src/Beman/Optional26/tests/test_types.hpp index 30915137..2ba0e3fb 100644 --- a/src/Beman/Optional26/tests/test_types.hpp +++ b/src/Beman/Optional26/tests/test_types.hpp @@ -1,3 +1,6 @@ +// src/Beman/Optional26/tests/test_types.h -*-C++-*- +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + #ifndef BEMAN_OPTIONAL26_TESTS_TEST_TYPES_HPP #define BEMAN_OPTIONAL26_TESTS_TEST_TYPES_HPP diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3a085d51..7be65236 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1 +1,4 @@ +# src/CMakeLists.txt -*-makefile-*- +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + add_subdirectory(Beman)