Skip to content

Commit

Permalink
🛠️ Reconstruct improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePhD committed Aug 7, 2024
1 parent 613a52d commit 7e5383a
Show file tree
Hide file tree
Showing 7 changed files with 212 additions and 187 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
#
# ============================================================================>

cmake_minimum_required(VERSION 3.21.0)
cmake_policy(VERSION 3.21)
cmake_minimum_required(VERSION 3.28.0)

# # Project kickstart
# Includes a bunch of basic flags and utilities shared across projects
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ function (google_benchmark_dependency_jail)
google_benchmark
GIT_REPOSITORY https://github.com/google/benchmark.git
GIT_TAG main
EXCLUDE_FROM_ALL
)
# Benchmark variables, internal setup
set(BENCHMARK_ENABLE_EXCEPTIONS ON)
Expand All @@ -54,7 +55,6 @@ function (google_benchmark_dependency_jail)
set(HAVE_STD_REGEX ON)
endif()
FetchContent_MakeAvailable(google_benchmark)
set_property(DIRECTORY "${google_benchmark_SOURCE_DIR}" PROPERTY EXCLUDE_FROM_ALL YES)
endfunction()
google_benchmark_dependency_jail()

Expand Down
6 changes: 3 additions & 3 deletions include/ztd/idk/basic_c_string_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ namespace ztd {
constexpr basic_c_string_view(const_iterator __arg0, const_iterator __arg1) noexcept
#if ZTD_IS_ON(ZTD_STD_LIBRARY_DEBUG_ITERATORS)
: __base_t(__arg0 == __arg1 ? empty_string<_CharType>() : ::std::addressof(*__arg0),
::std::distance(__arg0, __arg1)) {
::std::distance(__arg0, __arg1)) {
#else
: __base_t(::std::addressof(*__arg0), ::std::distance(__arg0, __arg1)) {
#endif
Expand Down Expand Up @@ -286,7 +286,7 @@ namespace ztd {

template <typename _It, typename _Sen,
::std::enable_if_t<!::std::is_same_v<remove_cvref_t<_Sen>, sentinel>>* = nullptr>
friend constexpr __base_t tag_invoke(ztd::tag_t<::ztd::ranges::reconstruct>,
friend constexpr __base_t reconstruct(
::std::in_place_type_t<basic_c_string_view>, _It __iterator, _Sen __sentinel) noexcept {
using _SizeType = typename __base_t::size_type;
if constexpr (!::std::is_integral_v<_Sen>) {
Expand All @@ -310,7 +310,7 @@ namespace ztd {
}

template <typename _It>
friend constexpr basic_c_string_view tag_invoke(ztd::tag_t<::ztd::ranges::reconstruct>,
friend constexpr basic_c_string_view reconstruct(
::std::in_place_type_t<basic_c_string_view>, _It __iterator, sentinel __sentinel) {
using _SizeType = typename __base_t::size_type;
#if ZTD_IS_ON(ZTD_STD_LIBRARY_DEBUG_ITERATORS)
Expand Down
Loading

0 comments on commit 7e5383a

Please sign in to comment.