diff options
Diffstat (limited to '')
-rw-r--r-- | external/frozen/Module_frozen.mk | 16 | ||||
-rw-r--r-- | external/frozen/README.md | 7 | ||||
-rw-r--r-- | external/frozen/UnpackedTarball_frozen.mk | 20 | ||||
-rw-r--r-- | external/frozen/cid1532449_use_move_ctor.0 | 29 | ||||
-rw-r--r-- | external/frozen/cid1538304_reference_ctor.0 | 33 | ||||
-rw-r--r-- | external/frozen/defines_h_constexpr_string.patch.0 | 11 |
6 files changed, 116 insertions, 0 deletions
diff --git a/external/frozen/Module_frozen.mk b/external/frozen/Module_frozen.mk new file mode 100644 index 0000000000..10fa0997e0 --- /dev/null +++ b/external/frozen/Module_frozen.mk @@ -0,0 +1,16 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Module_Module,frozen)) + +$(eval $(call gb_Module_add_targets,frozen,\ + UnpackedTarball_frozen \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/frozen/README.md b/external/frozen/README.md new file mode 100644 index 0000000000..56b011a771 --- /dev/null +++ b/external/frozen/README.md @@ -0,0 +1,7 @@ +External header only library frozen + +Header-only library that provides 0 cost initialization for immutable containers, fixed-size containers, and various algorithms. + +https://github.com/serge-sans-paille/frozen + +Release archives at: https://github.com/serge-sans-paille/frozen/tags diff --git a/external/frozen/UnpackedTarball_frozen.mk b/external/frozen/UnpackedTarball_frozen.mk new file mode 100644 index 0000000000..b33a05c7db --- /dev/null +++ b/external/frozen/UnpackedTarball_frozen.mk @@ -0,0 +1,20 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,frozen)) + +$(eval $(call gb_UnpackedTarball_set_tarball,frozen,$(FROZEN_TARBALL))) + +$(eval $(call gb_UnpackedTarball_add_patches,frozen,\ + external/frozen/defines_h_constexpr_string.patch.0 \ + external/frozen/cid1532449_use_move_ctor.0 \ + external/frozen/cid1538304_reference_ctor.0 \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/frozen/cid1532449_use_move_ctor.0 b/external/frozen/cid1532449_use_move_ctor.0 new file mode 100644 index 0000000000..cbee9e510b --- /dev/null +++ b/external/frozen/cid1532449_use_move_ctor.0 @@ -0,0 +1,29 @@ +--- include/frozen/unordered_map.h 2023-06-25 14:47:35.486459668 +0100 ++++ include/frozen/unordered_map.h 2023-06-25 14:55:58.787858570 +0100 +@@ -78,14 +78,24 @@ + public: + /* constructors */ + unordered_map(unordered_map const &) = default; +- constexpr unordered_map(container_type items, ++ constexpr unordered_map(container_type&& items, ++ Hash const &hash, KeyEqual const &equal) ++ : equal_{equal} ++ , items_(std::move(items)) ++ , tables_{ ++ bits::make_pmh_tables<storage_size>( ++ items_, hash, bits::GetKey{}, default_prg_t{})} {} ++ explicit constexpr unordered_map(container_type&& items) ++ : unordered_map{items, Hash{}, KeyEqual{}} {} ++ ++ constexpr unordered_map(const container_type& items, + Hash const &hash, KeyEqual const &equal) + : equal_{equal} + , items_{items} + , tables_{ + bits::make_pmh_tables<storage_size>( + items_, hash, bits::GetKey{}, default_prg_t{})} {} +- explicit constexpr unordered_map(container_type items) ++ explicit constexpr unordered_map(const container_type& items) + : unordered_map{items, Hash{}, KeyEqual{}} {} + + constexpr unordered_map(std::initializer_list<value_type> items, diff --git a/external/frozen/cid1538304_reference_ctor.0 b/external/frozen/cid1538304_reference_ctor.0 new file mode 100644 index 0000000000..c627686cd2 --- /dev/null +++ b/external/frozen/cid1538304_reference_ctor.0 @@ -0,0 +1,33 @@ +--- include/frozen/map.h 2023-07-22 20:20:19.580400347 +0100 ++++ include/frozen/map.h 2023-07-22 20:25:44.893704485 +0100 +@@ -94,11 +94,11 @@ + + public: + /* constructors */ +- constexpr map(container_type items, Compare const &compare) ++ constexpr map(const container_type& items, Compare const &compare) + : less_than_{compare} + , items_{bits::quicksort(items, less_than_)} {} + +- explicit constexpr map(container_type items) ++ explicit constexpr map(const container_type& items) + : map{items, Compare{}} {} + + constexpr map(std::initializer_list<value_type> items, Compare const &compare) +--- include/frozen/set.h 2023-09-29 09:19:22.208195458 +0100 ++++ include/frozen/set.h 2023-09-29 09:20:21.175291240 +0100 +@@ -59,12 +59,12 @@ + /* constructors */ + constexpr set(const set &other) = default; + +- constexpr set(container_type keys, Compare const & comp) ++ constexpr set(const container_type& keys, Compare const & comp) + : less_than_{comp} + , keys_(bits::quicksort(keys, less_than_)) { + } + +- explicit constexpr set(container_type keys) ++ explicit constexpr set(const container_type& keys) + : set{keys, Compare{}} {} + + constexpr set(std::initializer_list<Key> keys, Compare const & comp) diff --git a/external/frozen/defines_h_constexpr_string.patch.0 b/external/frozen/defines_h_constexpr_string.patch.0 new file mode 100644 index 0000000000..d911ce3f9f --- /dev/null +++ b/external/frozen/defines_h_constexpr_string.patch.0 @@ -0,0 +1,11 @@ +--- include/frozen/bits/defines.h ++++ include/frozen/bits/defines.h +@@ -59,7 +59,7 @@ + #define FROZEN_LETITGO_HAS_DEDUCTION_GUIDES + #endif + +-#if __cpp_lib_constexpr_string >= 201907L ++#if defined(__cpp_lib_constexpr_string) && __cpp_lib_constexpr_string >= 201907L + #define FROZEN_LETITGO_HAS_CONSTEXPR_STRING + #endif + |