From b3e69a988d27144dc6958c64f7a944f318260e12 Mon Sep 17 00:00:00 2001 From: Luc Rancourt Date: Mon, 23 Oct 2023 09:33:28 +0200 Subject: [PATCH 1/2] Fix the aggregates CPP API install files. This also changes the use of concepts in std::derived_from to std::is_base_of_v to not require users of the CPP API to use c++ 20. --- TYPE: IMPROVEMENT DESC: Fix the aggregates CPP API install files. --- tiledb/CMakeLists.txt | 2 ++ tiledb/sm/cpp_api/channel_operation.h | 4 +++- tiledb/sm/cpp_api/query_experimental.h | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tiledb/CMakeLists.txt b/tiledb/CMakeLists.txt index 07acc6d27cf..448ed76a56a 100644 --- a/tiledb/CMakeLists.txt +++ b/tiledb/CMakeLists.txt @@ -92,6 +92,7 @@ if (TILEDB_CPP_API) ${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/cpp_api/as_built_experimental.h ${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/cpp_api/attribute.h ${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/cpp_api/attribute_experimental.h + ${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/cpp_api/channel_operation.h ${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/cpp_api/config.h ${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/cpp_api/consolidation_plan_experimental.h ${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/cpp_api/context.h @@ -112,6 +113,7 @@ if (TILEDB_CPP_API) ${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/cpp_api/object.h ${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/cpp_api/object_iter.h ${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/cpp_api/query.h + ${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/cpp_api/query_channel.h ${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/cpp_api/query_condition_experimental.h ${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/cpp_api/query_condition.h ${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/cpp_api/query_experimental.h diff --git a/tiledb/sm/cpp_api/channel_operation.h b/tiledb/sm/cpp_api/channel_operation.h index 51153faed8b..31333d92a18 100644 --- a/tiledb/sm/cpp_api/channel_operation.h +++ b/tiledb/sm/cpp_api/channel_operation.h @@ -89,7 +89,9 @@ class ChannelOperation { * @param query The TileDB query * @param input_field The attribute name the aggregate operation will run on */ - template Op> + template < + class Op, + std::enable_if_t, bool> = true> static ChannelOperation create( const Query& query, const std::string& input_field) { const Context& ctx = query.ctx(); diff --git a/tiledb/sm/cpp_api/query_experimental.h b/tiledb/sm/cpp_api/query_experimental.h index 92906ab2179..d70adda7738 100644 --- a/tiledb/sm/cpp_api/query_experimental.h +++ b/tiledb/sm/cpp_api/query_experimental.h @@ -405,7 +405,9 @@ class QueryExperimental { * @param input_field The attribute name as input for the aggregate * @return The aggregate operation */ - template Op> + template < + class Op, + std::enable_if_t, bool> = true> static ChannelOperation create_unary_aggregate( const Query& query, const std::string& input_field) { return ChannelOperation::create(query, input_field); From 2a27744f2b3a219a1a3c1b70339e68371652645b Mon Sep 17 00:00:00 2001 From: Dirk Eddelbuettel Date: Mon, 23 Oct 2023 07:47:18 -0500 Subject: [PATCH 2/2] Also install cpp_api/channel_operator.h --- tiledb/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tiledb/CMakeLists.txt b/tiledb/CMakeLists.txt index 448ed76a56a..4f45f91ffe9 100644 --- a/tiledb/CMakeLists.txt +++ b/tiledb/CMakeLists.txt @@ -93,6 +93,7 @@ if (TILEDB_CPP_API) ${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/cpp_api/attribute.h ${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/cpp_api/attribute_experimental.h ${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/cpp_api/channel_operation.h + ${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/cpp_api/channel_operator.h ${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/cpp_api/config.h ${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/cpp_api/consolidation_plan_experimental.h ${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/cpp_api/context.h