Skip to content

Commit 1a4c1d3

Browse files
authored
Merge pull request #16 from camio/remove-26
iterator_interface26 -> iterator_interface
2 parents 2a3c0e4 + 49a9157 commit 1a4c1d3

File tree

18 files changed

+140
-143
lines changed

18 files changed

+140
-143
lines changed

CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,32 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
66
include(FetchContent)
77
include(CompilerFeatureTest)
88

9-
beman_iterator26_check_deducing_this(COMPILER_SUPPORTS_DEDUCING_THIS)
9+
beman_iterator_check_deducing_this(COMPILER_SUPPORTS_DEDUCING_THIS)
1010

11-
option(BEMAN_ITERATOR_INTERFACE26_USE_DEDUCING_THIS
11+
option(BEMAN_ITERATOR_INTERFACE_USE_DEDUCING_THIS
1212
"Make use of deducing this. Turn this off for non-conforming compilers."
1313
${COMPILER_SUPPORTS_DEDUCING_THIS})
1414

15-
option(BEMAN_ITERATOR_INTERFACE26_ENABLE_TESTING "Build beman.iterator_interface26 tests" ${PROJECT_IS_TOP_LEVEL})
15+
option(BEMAN_ITERATOR_INTERFACE_ENABLE_TESTING "Build beman.iterator_interface tests" ${PROJECT_IS_TOP_LEVEL})
1616

17-
if(BEMAN_ITERATOR_INTERFACE26_USE_DEDUCING_THIS AND NOT COMPILER_SUPPORTS_DEDUCING_THIS)
17+
if(BEMAN_ITERATOR_INTERFACE_USE_DEDUCING_THIS AND NOT COMPILER_SUPPORTS_DEDUCING_THIS)
1818
message(WARNING "Building with deducing this support despite of the compiler's lack of support for it")
1919
endif()
2020

2121
configure_file(
22-
"${PROJECT_SOURCE_DIR}/include/beman/iterator_interface26/config.hpp.in"
23-
"${PROJECT_BINARY_DIR}/include/beman/iterator_interface26/config.hpp"
22+
"${PROJECT_SOURCE_DIR}/include/beman/iterator_interface/config.hpp.in"
23+
"${PROJECT_BINARY_DIR}/include/beman/iterator_interface/config.hpp"
2424
@ONLY
2525
)
2626

27-
if(BEMAN_ITERATOR_INTERFACE26_ENABLE_TESTING)
27+
if(BEMAN_ITERATOR_INTERFACE_ENABLE_TESTING)
2828
enable_testing()
2929
endif()
3030

3131
set(TARGETS_EXPORT_NAME ${CMAKE_PROJECT_NAME}Targets)
3232

3333
add_subdirectory(extern)
34-
add_subdirectory(src/beman/iterator_interface26)
34+
add_subdirectory(src/beman/iterator_interface)
3535
add_subdirectory(examples)
3636

3737
include(GNUInstallDirs)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Beman.iterator: C++26 Extensions for iterators
1+
# beman.iterator\_interface: iterator creation mechanisms
22

33

44
**Implements**:

cmake/CompilerFeatureTest.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ include(CheckCXXSourceCompiles)
44

55
# Determines if the selected C++ compiler has deducing this support. Sets
66
# 'result_var' to whether support is detected.
7-
function(beman_iterator26_check_deducing_this result_var)
7+
function(beman_iterator_check_deducing_this result_var)
88
check_cxx_source_compiles( "
99
// clang-specific check due to http://github.com/llvm/llvm-project/issues/113174
1010
#if defined(__cpp_explicit_this_parameter) || (defined(__clang__) && __has_extension(cxx_explicit_this_parameter))

examples/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ foreach(EXAMPLE ${EXAMPLES})
1717
)
1818

1919
# Link example with the library.
20-
target_link_libraries(${EXAMPLE} beman.iterator_interface26)
20+
target_link_libraries(${EXAMPLE} beman.iterator_interface)
2121

2222
# Install .
2323
install(

examples/sample.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include <beman/iterator_interface26/iterator_interface.hpp>
1+
#include <beman/iterator_interface/iterator_interface.hpp>
22
#include <iostream>
33

44
int main() {

extern/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if(BEMAN_ITERATOR_INTERFACE26_ENABLE_TESTING)
1+
if(BEMAN_ITERATOR_INTERFACE_ENABLE_TESTING)
22
# Fetch GoogleTest
33
FetchContent_Declare(
44
googletest
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#ifndef BEMAN_ITERATOR_INTERFACE_CONFIG_HPP
2+
#define BEMAN_ITERATOR_INTERFACE_CONFIG_HPP
3+
4+
#cmakedefine01 BEMAN_ITERATOR_INTERFACE_USE_DEDUCING_THIS()
5+
6+
#endif
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2+
3+
// Copyright (C) 2020 T. Zachary Laine
4+
//
5+
// Distributed under the Boost Software License, Version 1.0. (See
6+
// accompanying file LICENSE_1_0.txt or copy at
7+
// http://www.boost.org/LICENSE_1_0.txt)
8+
#ifndef BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_CONFIG_HPP
9+
#define BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_CONFIG_HPP
10+
11+
// Included for definition of __cpp_lib_concepts.
12+
#include <iterator>
13+
14+
#if defined(__cpp_lib_concepts) && defined(__cpp_lib_ranges) && \
15+
!defined(BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_DISABLE_CONCEPTS)
16+
#define BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_USE_CONCEPTS 1
17+
#else
18+
#define BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_USE_CONCEPTS 0
19+
#endif
20+
21+
#if defined(__cpp_explicit_this_parameter) && BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_USE_CONCEPTS && \
22+
!defined(BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_DISABLE_DEDUCED_THIS)
23+
#define BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_USE_DEDUCED_THIS 1
24+
#else
25+
#define BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_USE_DEDUCED_THIS 0
26+
#endif
27+
28+
// The inline namespaces v1, v2, and v3 represent C++14, C++20, and C++23 and
29+
// later, respectively. v1 is inline for standards before C++20, and v2 is
30+
// inline for C++20 and later. Note that this only applies to code for which
31+
// multiple vI namespace alternatives exist. For example, some instances of
32+
// the v1 namespace may still be inline, if there is no v2 version of its
33+
// contents.
34+
#if !BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_USE_CONCEPTS && !BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_USE_DEDUCED_THIS
35+
#define BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_NAMESPACE_V1 inline namespace v1
36+
#define BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_NAMESPACE_V2 namespace v2
37+
#define BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_NAMESPACE_V3 namespace v3
38+
#elif BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_USE_CONCEPTS && !BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_USE_DEDUCED_THIS
39+
#define BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_NAMESPACE_V1 namespace v1
40+
#define BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_NAMESPACE_V2 inline namespace v2
41+
#define BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_NAMESPACE_V3 namespace v3
42+
#else
43+
#define BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_NAMESPACE_V1 namespace v1
44+
#define BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_NAMESPACE_V2 namespace v2
45+
#define BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_NAMESPACE_V3 inline namespace v3
46+
#endif
47+
48+
#endif

include/beman/iterator_interface26/detail/stl_interfaces/fwd.hpp renamed to include/beman/iterator_interface/detail/stl_interfaces/fwd.hpp

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,48 @@
1-
// include/beman/optional26/detail/stl_interfaces/fwd.hpp -*-C++-*-
21
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
32

43
// Copyright (C) 2019 T. Zachary Laine
54
//
65
// Distributed under the Boost Software License, Version 1.0. (See
76
// accompanying file LICENSE_1_0.txt or copy at
87
// http://www.boost.org/LICENSE_1_0.txt)
9-
#ifndef BEMAN_ITERATOR_INTERFACE26_DETAIL_STL_INTERFACES_FWD_HPP
10-
#define BEMAN_ITERATOR_INTERFACE26_DETAIL_STL_INTERFACES_FWD_HPP
8+
#ifndef BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_FWD_HPP
9+
#define BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_FWD_HPP
1110

12-
#include <beman/iterator_interface26/detail/stl_interfaces/config.hpp>
11+
#include <beman/iterator_interface/detail/stl_interfaces/config.hpp>
1312

14-
#if BEMAN_ITERATOR_INTERFACE26_DETAIL_STL_INTERFACES_USE_CONCEPTS
13+
#if BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_USE_CONCEPTS
1514
#include <ranges>
1615
#endif
1716
#if defined(__cpp_lib_three_way_comparison)
1817
#include <compare>
1918
#endif
2019

21-
#ifndef BEMAN_ITERATOR_INTERFACE26_DETAIL_STL_INTERFACES_DOXYGEN
20+
#ifndef BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_DOXYGEN
2221

2322
#if defined(_MSC_VER) || defined(__GNUC__) && __GNUC__ < 8
24-
#define BEMAN_ITERATOR_INTERFACE26_DETAIL_STL_INTERFACES_NO_HIDDEN_FRIEND_CONSTEXPR
25-
#define BEMAN_ITERATOR_INTERFACE26_DETAIL_STL_INTERFACES_HIDDEN_FRIEND_CONSTEXPR
23+
#define BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_NO_HIDDEN_FRIEND_CONSTEXPR
24+
#define BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_HIDDEN_FRIEND_CONSTEXPR
2625
#else
27-
#define BEMAN_ITERATOR_INTERFACE26_DETAIL_STL_INTERFACES_HIDDEN_FRIEND_CONSTEXPR constexpr
26+
#define BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_HIDDEN_FRIEND_CONSTEXPR constexpr
2827
#endif
2928

3029
#if defined(__GNUC__) && __GNUC__ < 9
31-
#define BEMAN_ITERATOR_INTERFACE26_DETAIL_STL_INTERFACES_CONCEPT concept bool
30+
#define BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_CONCEPT concept bool
3231
#else
33-
#define BEMAN_ITERATOR_INTERFACE26_DETAIL_STL_INTERFACES_CONCEPT concept
32+
#define BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_CONCEPT concept
3433
#endif
3534

3635
#endif
3736

38-
namespace beman::iterator_interface26::detail {
37+
namespace beman::iterator_interface::detail {
3938
namespace stl_interfaces {
4039

4140
/** An enumeration used to indicate whether the underlying data have a
4241
contiguous or discontiguous layout when instantiating `view_interface`
4342
and `sequence_container_interface`. */
4443
enum class element_layout : bool { discontiguous = false, contiguous = true };
4544

46-
BEMAN_ITERATOR_INTERFACE26_DETAIL_STL_INTERFACES_NAMESPACE_V1 {
45+
BEMAN_ITERATOR_INTERFACE_DETAIL_STL_INTERFACES_NAMESPACE_V1 {
4746

4847
namespace v1_dtl {
4948
template <typename... T>
@@ -83,6 +82,6 @@ BEMAN_ITERATOR_INTERFACE26_DETAIL_STL_INTERFACES_NAMESPACE_V1 {
8382
} // namespace v1_dtl
8483
}
8584
} // namespace stl_interfaces
86-
} // namespace beman::optional26::detail
85+
} // namespace beman::iterator_interface::detail
8786

8887
#endif

0 commit comments

Comments
 (0)