Skip to content

Commit 69149a1

Browse files
Copy-on-write wrapper (#28)
* copy-on-write wrapper for containers * alloc-aware part 1: initial allocator support * add temp test case * alloc-aware part 2: everything else * remove temp test file * fix support for cows that don't use allocators * Formatting nitpicking * Rename `traits_t` to `traits_type` * some tweaks * rename to viewed_type and owned_type * use compressed_pair * `default_allocator_t` -> `default_allocator_type` * split into cow_span and cow_writable_span --------- Co-authored-by: Brady <zeromemesdev@gmail.com>
1 parent 2ab4769 commit 69149a1

File tree

2 files changed

+448
-0
lines changed

2 files changed

+448
-0
lines changed

include/libhat/concepts.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,7 @@ namespace hat::detail {
4242

4343
template<typename T>
4444
concept char_iterator = std::is_same_v<std::iter_value_t<T>, char>;
45+
46+
template<typename T>
47+
concept non_const = !std::is_const_v<T>;
4548
}

0 commit comments

Comments
 (0)