couchbase 3.5.4 → 3.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/ext/CMakeLists.txt +8 -6
- data/ext/cache/cpm/{CPM_0.38.6.cmake → CPM_0.40.5.cmake} +152 -22
- data/ext/cache/extconf_include.rb +3 -3
- data/ext/cache/mozilla-ca-bundle.crt +32 -87
- data/ext/cache/mozilla-ca-bundle.sha256 +1 -1
- data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/CMakeLists.txt +30 -6
- data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/cmake/utils.cmake +13 -2
- data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/async_logger-inl.h +5 -7
- data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/mpmc_blocking_q.h +3 -3
- data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/os-inl.h +3 -3
- data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/thread_pool-inl.h +3 -8
- data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/thread_pool.h +3 -14
- data/ext/cache/{fmt/141a17a028e6c29914e109691389f6cf87f9cfe3/fmt/include/fmt → spdlog/7251ead404dccd824789f8f3a13df2a6fb56440c/spdlog/include/spdlog/fmt/bundled}/base.h +47 -31
- data/ext/cache/{fmt/141a17a028e6c29914e109691389f6cf87f9cfe3/fmt/include/fmt → spdlog/7251ead404dccd824789f8f3a13df2a6fb56440c/spdlog/include/spdlog/fmt/bundled}/format-inl.h +32 -8
- data/ext/cache/{fmt/141a17a028e6c29914e109691389f6cf87f9cfe3/fmt/include/fmt → spdlog/7251ead404dccd824789f8f3a13df2a6fb56440c/spdlog/include/spdlog/fmt/bundled}/format.h +22 -14
- data/ext/cache/{fmt/141a17a028e6c29914e109691389f6cf87f9cfe3/fmt/include/fmt → spdlog/7251ead404dccd824789f8f3a13df2a6fb56440c/spdlog/include/spdlog/fmt/bundled}/ranges.h +1 -1
- data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/mdc.h +4 -0
- data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/pattern_formatter-inl.h +16 -2
- data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/ansicolor_sink.h +1 -1
- data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/base_sink.h +4 -4
- data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/callback_sink.h +1 -1
- data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/daily_file_sink.h +3 -0
- data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/hourly_file_sink.h +2 -0
- data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/msvc_sink.h +1 -1
- data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/rotating_file_sink-inl.h +1 -1
- data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/syslog_sink.h +3 -2
- data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/wincolor_sink-inl.h +9 -0
- data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/version.h +2 -2
- data/ext/cache/{fmt/141a17a028e6c29914e109691389f6cf87f9cfe3/fmt/src/format.cc → spdlog/7251ead404dccd824789f8f3a13df2a6fb56440c/spdlog/src/bundled_fmtlib_format.cpp} +10 -5
- data/ext/couchbase/CMakeLists.txt +3 -2
- data/ext/couchbase/cmake/APKBUILD.in +54 -0
- data/ext/couchbase/cmake/Backtrace.cmake +3 -1
- data/ext/couchbase/cmake/CPM.cmake +1 -1
- data/ext/couchbase/cmake/CompilerWarnings.cmake +0 -5
- data/ext/couchbase/cmake/Packaging.cmake +174 -11
- data/ext/couchbase/cmake/RPath.cmake +10 -0
- data/ext/couchbase/cmake/Testing.cmake +0 -4
- data/ext/couchbase/cmake/ThirdPartyDependencies.cmake +7 -26
- data/ext/couchbase/cmake/VersionInfo.cmake +4 -0
- data/ext/couchbase/cmake/build_version.hxx.in +1 -0
- data/ext/couchbase/cmake/couchbase-cxx-client.spec.in +2 -2
- data/ext/couchbase/cmake/couchbase_cxx_client.pc.in +2 -2
- data/ext/couchbase/core/agent_config.cxx +1 -1
- data/ext/couchbase/core/agent_group_config.cxx +1 -1
- data/ext/couchbase/core/bucket.cxx +9 -9
- data/ext/couchbase/core/cluster.cxx +0 -2
- data/ext/couchbase/core/cluster_agent_config.cxx +1 -1
- data/ext/couchbase/core/collections_component.cxx +1 -1
- data/ext/couchbase/core/columnar/agent_config.cxx +2 -2
- data/ext/couchbase/core/columnar/error.hxx +0 -1
- data/ext/couchbase/core/columnar/query_component.cxx +2 -2
- data/ext/couchbase/core/config_profiles.cxx +1 -1
- data/ext/couchbase/core/core_sdk_shim.cxx +1 -1
- data/ext/couchbase/core/crud_component.cxx +1 -1
- data/ext/couchbase/core/design_document_namespace_fmt.hxx +1 -1
- data/ext/couchbase/core/diagnostics_fmt.hxx +1 -1
- data/ext/couchbase/core/document_id.cxx +1 -1
- data/ext/couchbase/core/document_id_fmt.hxx +1 -1
- data/ext/couchbase/core/error_context/analytics_json.hxx +3 -1
- data/ext/couchbase/core/error_context/key_value_json.hxx +1 -1
- data/ext/couchbase/core/error_context/query_public_json.hxx +1 -1
- data/ext/couchbase/core/error_context/subdocument_json.hxx +1 -1
- data/ext/couchbase/core/fmt/key_value_error_map_attribute.hxx +1 -1
- data/ext/couchbase/core/fmt/key_value_extended_error_info.hxx +1 -1
- data/ext/couchbase/core/fmt/key_value_status_code.hxx +1 -1
- data/ext/couchbase/core/http_component.cxx +3 -3
- data/ext/couchbase/core/impl/analytics.cxx +1 -0
- data/ext/couchbase/core/impl/best_effort_retry_strategy.cxx +1 -1
- data/ext/couchbase/core/impl/collection.cxx +28 -4
- data/ext/couchbase/core/impl/date_range.cxx +2 -2
- data/ext/couchbase/core/impl/date_range_query.cxx +2 -2
- data/ext/couchbase/core/impl/dns_srv_tracker.cxx +1 -1
- data/ext/couchbase/core/impl/error.cxx +27 -4
- data/ext/couchbase/core/impl/expiry.cxx +2 -2
- data/ext/couchbase/core/impl/fail_fast_retry_strategy.cxx +1 -2
- data/ext/couchbase/core/impl/get_replica.hxx +2 -0
- data/ext/couchbase/core/impl/key_value_error_context.cxx +6 -4
- data/ext/couchbase/core/impl/lookup_in_replica.hxx +2 -0
- data/ext/couchbase/core/impl/numeric_range.cxx +1 -1
- data/ext/couchbase/core/impl/observe_seqno.hxx +2 -0
- data/ext/couchbase/core/impl/query.cxx +1 -0
- data/ext/couchbase/core/impl/query_error_context.cxx +3 -2
- data/ext/couchbase/core/impl/scope.cxx +5 -6
- data/ext/couchbase/core/impl/search.cxx +3 -1
- data/ext/couchbase/core/io/config_tracker.cxx +1 -1
- data/ext/couchbase/core/io/dns_client.cxx +23 -8
- data/ext/couchbase/core/io/http_command.hxx +2 -2
- data/ext/couchbase/core/io/http_parser.cxx +1 -1
- data/ext/couchbase/core/io/http_session.cxx +4 -0
- data/ext/couchbase/core/io/http_session.hxx +4 -2
- data/ext/couchbase/core/io/mcbp_command.hxx +2 -2
- data/ext/couchbase/core/key_value_config.cxx +2 -2
- data/ext/couchbase/core/logger/logger.hxx +1 -1
- data/ext/couchbase/core/management/rbac_fmt.hxx +1 -1
- data/ext/couchbase/core/mcbp/operation_queue.cxx +1 -1
- data/ext/couchbase/core/mcbp/packet.cxx +1 -1
- data/ext/couchbase/core/meta/features.hxx +11 -0
- data/ext/couchbase/core/meta/version.cxx +48 -7
- data/ext/couchbase/core/operations/document_analytics.cxx +23 -17
- data/ext/couchbase/core/operations/document_analytics.hxx +1 -0
- data/ext/couchbase/core/operations/document_append.hxx +2 -0
- data/ext/couchbase/core/operations/document_decrement.hxx +2 -0
- data/ext/couchbase/core/operations/document_exists.hxx +2 -0
- data/ext/couchbase/core/operations/document_get.hxx +2 -0
- data/ext/couchbase/core/operations/document_get_all_replicas.hxx +2 -0
- data/ext/couchbase/core/operations/document_get_and_lock.hxx +2 -0
- data/ext/couchbase/core/operations/document_get_and_touch.hxx +2 -0
- data/ext/couchbase/core/operations/document_get_any_replica.hxx +2 -0
- data/ext/couchbase/core/operations/document_get_projected.hxx +2 -0
- data/ext/couchbase/core/operations/document_increment.hxx +2 -0
- data/ext/couchbase/core/operations/document_insert.hxx +2 -0
- data/ext/couchbase/core/operations/document_lookup_in.hxx +2 -0
- data/ext/couchbase/core/operations/document_lookup_in_all_replicas.hxx +2 -0
- data/ext/couchbase/core/operations/document_lookup_in_any_replica.hxx +2 -0
- data/ext/couchbase/core/operations/document_mutate_in.hxx +2 -0
- data/ext/couchbase/core/operations/document_prepend.hxx +2 -0
- data/ext/couchbase/core/operations/document_query.hxx +1 -0
- data/ext/couchbase/core/operations/document_remove.hxx +2 -0
- data/ext/couchbase/core/operations/document_replace.hxx +2 -0
- data/ext/couchbase/core/operations/document_search.hxx +1 -0
- data/ext/couchbase/core/operations/document_touch.hxx +2 -0
- data/ext/couchbase/core/operations/document_unlock.hxx +2 -0
- data/ext/couchbase/core/operations/document_upsert.hxx +2 -0
- data/ext/couchbase/core/operations/document_view.hxx +1 -0
- data/ext/couchbase/core/operations/http_noop.hxx +2 -0
- data/ext/couchbase/core/operations/management/CMakeLists.txt +0 -1
- data/ext/couchbase/core/operations/management/analytics_dataset_create.cxx +1 -1
- data/ext/couchbase/core/operations/management/analytics_dataset_create.hxx +1 -0
- data/ext/couchbase/core/operations/management/analytics_dataset_drop.cxx +1 -1
- data/ext/couchbase/core/operations/management/analytics_dataset_drop.hxx +1 -0
- data/ext/couchbase/core/operations/management/analytics_dataset_get_all.hxx +1 -0
- data/ext/couchbase/core/operations/management/analytics_dataverse_create.cxx +1 -1
- data/ext/couchbase/core/operations/management/analytics_dataverse_create.hxx +1 -0
- data/ext/couchbase/core/operations/management/analytics_dataverse_drop.cxx +1 -1
- data/ext/couchbase/core/operations/management/analytics_dataverse_drop.hxx +1 -0
- data/ext/couchbase/core/operations/management/analytics_get_pending_mutations.cxx +1 -1
- data/ext/couchbase/core/operations/management/analytics_get_pending_mutations.hxx +2 -0
- data/ext/couchbase/core/operations/management/analytics_index_create.hxx +1 -0
- data/ext/couchbase/core/operations/management/analytics_index_drop.cxx +1 -1
- data/ext/couchbase/core/operations/management/analytics_index_drop.hxx +1 -0
- data/ext/couchbase/core/operations/management/analytics_index_get_all.hxx +1 -0
- data/ext/couchbase/core/operations/management/analytics_link_connect.cxx +1 -1
- data/ext/couchbase/core/operations/management/analytics_link_connect.hxx +1 -0
- data/ext/couchbase/core/operations/management/analytics_link_create.hxx +1 -0
- data/ext/couchbase/core/operations/management/analytics_link_disconnect.cxx +1 -1
- data/ext/couchbase/core/operations/management/analytics_link_disconnect.hxx +1 -0
- data/ext/couchbase/core/operations/management/analytics_link_drop.cxx +1 -1
- data/ext/couchbase/core/operations/management/analytics_link_drop.hxx +1 -0
- data/ext/couchbase/core/operations/management/analytics_link_get_all.cxx +24 -16
- data/ext/couchbase/core/operations/management/analytics_link_get_all.hxx +4 -3
- data/ext/couchbase/core/operations/management/analytics_link_replace.hxx +1 -0
- data/ext/couchbase/core/operations/management/analytics_link_utils.hxx +4 -3
- data/ext/couchbase/core/operations/management/bucket_create.hxx +1 -0
- data/ext/couchbase/core/operations/management/bucket_describe.cxx +1 -1
- data/ext/couchbase/core/operations/management/bucket_describe.hxx +1 -0
- data/ext/couchbase/core/operations/management/bucket_drop.cxx +1 -1
- data/ext/couchbase/core/operations/management/bucket_drop.hxx +1 -0
- data/ext/couchbase/core/operations/management/bucket_flush.cxx +1 -1
- data/ext/couchbase/core/operations/management/bucket_flush.hxx +1 -0
- data/ext/couchbase/core/operations/management/bucket_get.cxx +1 -1
- data/ext/couchbase/core/operations/management/bucket_get.hxx +1 -0
- data/ext/couchbase/core/operations/management/bucket_get_all.hxx +1 -0
- data/ext/couchbase/core/operations/management/bucket_update.hxx +1 -0
- data/ext/couchbase/core/operations/management/change_password.cxx +1 -1
- data/ext/couchbase/core/operations/management/change_password.hxx +1 -0
- data/ext/couchbase/core/operations/management/cluster_describe.hxx +1 -0
- data/ext/couchbase/core/operations/management/cluster_developer_preview_enable.hxx +1 -0
- data/ext/couchbase/core/operations/management/collection_create.cxx +1 -1
- data/ext/couchbase/core/operations/management/collection_create.hxx +2 -0
- data/ext/couchbase/core/operations/management/collection_drop.cxx +1 -1
- data/ext/couchbase/core/operations/management/collection_drop.hxx +1 -0
- data/ext/couchbase/core/operations/management/collection_update.cxx +1 -1
- data/ext/couchbase/core/operations/management/collection_update.hxx +2 -0
- data/ext/couchbase/core/operations/management/collections_manifest_get.hxx +2 -0
- data/ext/couchbase/core/operations/management/eventing_deploy_function.cxx +1 -1
- data/ext/couchbase/core/operations/management/eventing_deploy_function.hxx +3 -2
- data/ext/couchbase/core/operations/management/eventing_drop_function.cxx +1 -1
- data/ext/couchbase/core/operations/management/eventing_drop_function.hxx +3 -2
- data/ext/couchbase/core/operations/management/eventing_get_all_functions.hxx +3 -2
- data/ext/couchbase/core/operations/management/eventing_get_function.cxx +1 -1
- data/ext/couchbase/core/operations/management/eventing_get_function.hxx +3 -2
- data/ext/couchbase/core/operations/management/eventing_get_status.hxx +3 -2
- data/ext/couchbase/core/operations/management/eventing_pause_function.cxx +1 -1
- data/ext/couchbase/core/operations/management/eventing_pause_function.hxx +3 -2
- data/ext/couchbase/core/operations/management/eventing_resume_function.cxx +1 -1
- data/ext/couchbase/core/operations/management/eventing_resume_function.hxx +3 -2
- data/ext/couchbase/core/operations/management/eventing_undeploy_function.cxx +1 -1
- data/ext/couchbase/core/operations/management/eventing_undeploy_function.hxx +3 -2
- data/ext/couchbase/core/operations/management/eventing_upsert_function.cxx +1 -2
- data/ext/couchbase/core/operations/management/eventing_upsert_function.hxx +3 -2
- data/ext/couchbase/core/operations/management/freeform.hxx +2 -0
- data/ext/couchbase/core/operations/management/group_drop.cxx +1 -1
- data/ext/couchbase/core/operations/management/group_drop.hxx +1 -0
- data/ext/couchbase/core/operations/management/group_get.cxx +1 -1
- data/ext/couchbase/core/operations/management/group_get.hxx +1 -0
- data/ext/couchbase/core/operations/management/group_get_all.hxx +1 -0
- data/ext/couchbase/core/operations/management/group_upsert.hxx +1 -0
- data/ext/couchbase/core/operations/management/query_index_build.hxx +7 -5
- data/ext/couchbase/core/operations/management/query_index_build_deferred.hxx +3 -0
- data/ext/couchbase/core/operations/management/query_index_create.cxx +1 -1
- data/ext/couchbase/core/operations/management/query_index_create.hxx +1 -0
- data/ext/couchbase/core/operations/management/query_index_drop.cxx +1 -1
- data/ext/couchbase/core/operations/management/query_index_drop.hxx +1 -0
- data/ext/couchbase/core/operations/management/query_index_get_all.hxx +2 -0
- data/ext/couchbase/core/operations/management/query_index_get_all_deferred.hxx +3 -0
- data/ext/couchbase/core/operations/management/role_get_all.hxx +1 -0
- data/ext/couchbase/core/operations/management/scope_create.cxx +1 -1
- data/ext/couchbase/core/operations/management/scope_create.hxx +1 -0
- data/ext/couchbase/core/operations/management/scope_drop.cxx +1 -1
- data/ext/couchbase/core/operations/management/scope_drop.hxx +1 -0
- data/ext/couchbase/core/operations/management/scope_get_all.cxx +1 -1
- data/ext/couchbase/core/operations/management/scope_get_all.hxx +1 -0
- data/ext/couchbase/core/operations/management/search_get_stats.hxx +1 -0
- data/ext/couchbase/core/operations/management/search_index_analyze_document.cxx +1 -1
- data/ext/couchbase/core/operations/management/search_index_analyze_document.hxx +1 -0
- data/ext/couchbase/core/operations/management/search_index_control_ingest.cxx +1 -1
- data/ext/couchbase/core/operations/management/search_index_control_ingest.hxx +1 -0
- data/ext/couchbase/core/operations/management/search_index_control_plan_freeze.cxx +1 -1
- data/ext/couchbase/core/operations/management/search_index_control_plan_freeze.hxx +1 -0
- data/ext/couchbase/core/operations/management/search_index_control_query.cxx +1 -1
- data/ext/couchbase/core/operations/management/search_index_control_query.hxx +1 -0
- data/ext/couchbase/core/operations/management/search_index_drop.cxx +1 -1
- data/ext/couchbase/core/operations/management/search_index_drop.hxx +1 -0
- data/ext/couchbase/core/operations/management/search_index_get.cxx +1 -1
- data/ext/couchbase/core/operations/management/search_index_get.hxx +1 -0
- data/ext/couchbase/core/operations/management/search_index_get_all.cxx +1 -1
- data/ext/couchbase/core/operations/management/search_index_get_all.hxx +1 -0
- data/ext/couchbase/core/operations/management/search_index_get_documents_count.cxx +1 -1
- data/ext/couchbase/core/operations/management/search_index_get_documents_count.hxx +2 -0
- data/ext/couchbase/core/operations/management/search_index_get_stats.cxx +1 -1
- data/ext/couchbase/core/operations/management/search_index_get_stats.hxx +1 -0
- data/ext/couchbase/core/operations/management/search_index_upsert.cxx +1 -1
- data/ext/couchbase/core/operations/management/search_index_upsert.hxx +1 -0
- data/ext/couchbase/core/operations/management/user_drop.hxx +1 -0
- data/ext/couchbase/core/operations/management/user_get.hxx +1 -0
- data/ext/couchbase/core/operations/management/user_get_all.hxx +1 -0
- data/ext/couchbase/core/operations/management/user_upsert.cxx +3 -3
- data/ext/couchbase/core/operations/management/user_upsert.hxx +1 -0
- data/ext/couchbase/core/operations/management/view_index_drop.cxx +1 -1
- data/ext/couchbase/core/operations/management/view_index_drop.hxx +1 -0
- data/ext/couchbase/core/operations/management/view_index_get.cxx +1 -1
- data/ext/couchbase/core/operations/management/view_index_get.hxx +1 -0
- data/ext/couchbase/core/operations/management/view_index_get_all.cxx +1 -1
- data/ext/couchbase/core/operations/management/view_index_get_all.hxx +2 -0
- data/ext/couchbase/core/operations/management/view_index_upsert.cxx +1 -1
- data/ext/couchbase/core/operations/management/view_index_upsert.hxx +1 -0
- data/ext/couchbase/core/origin.cxx +3 -2
- data/ext/couchbase/core/platform/base64.h +8 -8
- data/ext/couchbase/core/protocol/client_opcode_fmt.hxx +1 -1
- data/ext/couchbase/core/protocol/client_response.hxx +1 -1
- data/ext/couchbase/core/protocol/frame_info_id_fmt.hxx +1 -1
- data/ext/couchbase/core/protocol/hello_feature_fmt.hxx +1 -1
- data/ext/couchbase/core/protocol/magic_fmt.hxx +1 -1
- data/ext/couchbase/core/protocol/server_opcode_fmt.hxx +1 -1
- data/ext/couchbase/core/query_context.hxx +7 -6
- data/ext/couchbase/core/retry_orchestrator.cxx +1 -1
- data/ext/couchbase/core/sasl/CMakeLists.txt +0 -1
- data/ext/couchbase/core/sasl/error_fmt.h +1 -1
- data/ext/couchbase/core/seed_config.cxx +2 -2
- data/ext/couchbase/core/service_type_fmt.hxx +1 -1
- data/ext/couchbase/core/topology/capabilities_fmt.hxx +1 -1
- data/ext/couchbase/core/topology/collections_manifest_fmt.hxx +2 -1
- data/ext/couchbase/core/topology/configuration_fmt.hxx +1 -1
- data/ext/couchbase/core/transactions/async_attempt_context.cxx +1 -1
- data/ext/couchbase/core/transactions/async_attempt_context.hxx +9 -22
- data/ext/couchbase/core/transactions/attempt_context.cxx +1 -1
- data/ext/couchbase/core/transactions/attempt_context.hxx +6 -33
- data/ext/couchbase/core/transactions/attempt_context_impl.cxx +41 -41
- data/ext/couchbase/core/transactions/attempt_context_impl.hxx +15 -16
- data/ext/couchbase/core/transactions/exceptions_fmt.hxx +1 -1
- data/ext/couchbase/core/transactions/internal/atr_cleanup_entry.hxx +1 -1
- data/ext/couchbase/core/transactions/internal/client_record.hxx +4 -3
- data/ext/couchbase/core/transactions/internal/doc_record_fmt.hxx +1 -1
- data/ext/couchbase/core/transactions/internal/exceptions_internal.hxx +0 -2
- data/ext/couchbase/core/transactions/internal/exceptions_internal_fmt.hxx +1 -1
- data/ext/couchbase/core/transactions/internal/logging.hxx +2 -0
- data/ext/couchbase/core/transactions/internal/transaction_context.hxx +3 -0
- data/ext/couchbase/core/transactions/result_fmt.hxx +1 -1
- data/ext/couchbase/core/transactions/transaction_context.cxx +12 -2
- data/ext/couchbase/core/transactions/transaction_get_result.hxx +0 -20
- data/ext/couchbase/core/transactions/transaction_links.hxx +1 -1
- data/ext/couchbase/core/utils/join_strings.hxx +2 -2
- data/ext/couchbase/core/utils/keyspace.hxx +2 -1
- data/ext/couchbase/core/utils/url_codec.cxx +1 -1
- data/ext/couchbase/couchbase/common_options.hxx +16 -1
- data/ext/couchbase/couchbase/fmt/analytics_scan_consistency.hxx +0 -2
- data/ext/couchbase/couchbase/fmt/analytics_status.hxx +0 -2
- data/ext/couchbase/couchbase/fmt/cas.hxx +0 -2
- data/ext/couchbase/couchbase/fmt/durability_level.hxx +0 -2
- data/ext/couchbase/couchbase/fmt/error.hxx +0 -2
- data/ext/couchbase/couchbase/fmt/error_context.hxx +0 -2
- data/ext/couchbase/couchbase/fmt/mutation_token.hxx +0 -2
- data/ext/couchbase/couchbase/fmt/query_profile.hxx +0 -2
- data/ext/couchbase/couchbase/fmt/query_scan_consistency.hxx +0 -2
- data/ext/couchbase/couchbase/fmt/query_status.hxx +0 -2
- data/ext/couchbase/couchbase/fmt/retry_reason.hxx +5 -1
- data/ext/couchbase/couchbase/fmt/search_scan_consistency.hxx +0 -2
- data/ext/couchbase/couchbase/fmt/tls_verify_mode.hxx +0 -2
- data/ext/couchbase/couchbase/fmt/transaction_keyspace.hxx +0 -2
- data/ext/couchbase/couchbase/metrics/otel_meter.hxx +16 -20
- data/ext/extconf.rb +1 -0
- data/ext/rcb_analytics.cxx +7 -7
- data/ext/rcb_backend.cxx +6 -1
- data/ext/rcb_buckets.cxx +1 -1
- data/ext/rcb_collections.cxx +1 -1
- data/ext/rcb_crud.cxx +51 -30
- data/ext/rcb_diagnostics.cxx +1 -1
- data/ext/rcb_exceptions.cxx +3 -2
- data/ext/rcb_extras.cxx +1 -1
- data/ext/rcb_range_scan.cxx +1 -1
- data/ext/rcb_search.cxx +1 -1
- data/ext/rcb_users.cxx +2 -2
- data/ext/rcb_utils.hxx +32 -0
- data/lib/couchbase/logger.rb +3 -3
- data/lib/couchbase/options.rb +48 -0
- data/lib/couchbase/version.rb +1 -1
- metadata +131 -153
- data/ext/cache/fmt/141a17a028e6c29914e109691389f6cf87f9cfe3/fmt/CMakeLists.txt +0 -520
- data/ext/cache/fmt/141a17a028e6c29914e109691389f6cf87f9cfe3/fmt/ChangeLog.md +0 -2598
- data/ext/cache/fmt/141a17a028e6c29914e109691389f6cf87f9cfe3/fmt/LICENSE +0 -27
- data/ext/cache/fmt/141a17a028e6c29914e109691389f6cf87f9cfe3/fmt/README.md +0 -484
- data/ext/cache/fmt/141a17a028e6c29914e109691389f6cf87f9cfe3/fmt/src/fmt.cc +0 -135
- data/ext/cache/fmt/141a17a028e6c29914e109691389f6cf87f9cfe3/fmt/src/os.cc +0 -403
- data/ext/cache/fmt/141a17a028e6c29914e109691389f6cf87f9cfe3/fmt/support/cmake/FindSetEnv.cmake +0 -7
- data/ext/cache/fmt/141a17a028e6c29914e109691389f6cf87f9cfe3/fmt/support/cmake/JoinPaths.cmake +0 -26
- data/ext/cache/fmt/141a17a028e6c29914e109691389f6cf87f9cfe3/fmt/support/cmake/fmt-config.cmake.in +0 -7
- data/ext/cache/fmt/141a17a028e6c29914e109691389f6cf87f9cfe3/fmt/support/cmake/fmt.pc.in +0 -11
- data/ext/cache/spdlog/19df5d3d8e5526c255d27414e09568671ef87483/spdlog/include/spdlog/fmt/bundled/args.h +0 -235
- data/ext/cache/spdlog/19df5d3d8e5526c255d27414e09568671ef87483/spdlog/include/spdlog/fmt/bundled/chrono.h +0 -2240
- data/ext/cache/spdlog/19df5d3d8e5526c255d27414e09568671ef87483/spdlog/include/spdlog/fmt/bundled/color.h +0 -643
- data/ext/cache/spdlog/19df5d3d8e5526c255d27414e09568671ef87483/spdlog/include/spdlog/fmt/bundled/compile.h +0 -535
- data/ext/cache/spdlog/19df5d3d8e5526c255d27414e09568671ef87483/spdlog/include/spdlog/fmt/bundled/core.h +0 -2969
- data/ext/cache/spdlog/19df5d3d8e5526c255d27414e09568671ef87483/spdlog/include/spdlog/fmt/bundled/format-inl.h +0 -1678
- data/ext/cache/spdlog/19df5d3d8e5526c255d27414e09568671ef87483/spdlog/include/spdlog/fmt/bundled/format.h +0 -4535
- data/ext/cache/spdlog/19df5d3d8e5526c255d27414e09568671ef87483/spdlog/include/spdlog/fmt/bundled/os.h +0 -455
- data/ext/cache/spdlog/19df5d3d8e5526c255d27414e09568671ef87483/spdlog/include/spdlog/fmt/bundled/ostream.h +0 -245
- data/ext/cache/spdlog/19df5d3d8e5526c255d27414e09568671ef87483/spdlog/include/spdlog/fmt/bundled/printf.h +0 -675
- data/ext/cache/spdlog/19df5d3d8e5526c255d27414e09568671ef87483/spdlog/include/spdlog/fmt/bundled/ranges.h +0 -738
- data/ext/cache/spdlog/19df5d3d8e5526c255d27414e09568671ef87483/spdlog/include/spdlog/fmt/bundled/std.h +0 -537
- data/ext/cache/spdlog/19df5d3d8e5526c255d27414e09568671ef87483/spdlog/include/spdlog/fmt/bundled/xchar.h +0 -259
- data/ext/cache/spdlog/19df5d3d8e5526c255d27414e09568671ef87483/spdlog/src/bundled_fmtlib_format.cpp +0 -46
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/LICENSE +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/cmake/ide.cmake +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/cmake/pch.h.in +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/cmake/spdlog.pc.in +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/cmake/spdlogCPack.cmake +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/cmake/spdlogConfig.cmake.in +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/cmake/version.rc.in +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/async.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/async_logger.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/cfg/argv.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/cfg/env.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/cfg/helpers-inl.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/cfg/helpers.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/common-inl.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/common.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/backtracer-inl.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/backtracer.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/circular_q.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/console_globals.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/file_helper-inl.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/file_helper.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/fmt_helper.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/log_msg-inl.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/log_msg.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/log_msg_buffer-inl.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/log_msg_buffer.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/null_mutex.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/os.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/periodic_worker-inl.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/periodic_worker.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/registry-inl.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/registry.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/synchronous_factory.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/tcp_client-windows.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/tcp_client.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/udp_client-windows.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/udp_client.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/details/windows_include.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/fmt/bin_to_hex.h +0 -0
- /data/ext/cache/{fmt/141a17a028e6c29914e109691389f6cf87f9cfe3/fmt/include/fmt → spdlog/7251ead404dccd824789f8f3a13df2a6fb56440c/spdlog/include/spdlog/fmt/bundled}/args.h +0 -0
- /data/ext/cache/{fmt/141a17a028e6c29914e109691389f6cf87f9cfe3/fmt/include/fmt → spdlog/7251ead404dccd824789f8f3a13df2a6fb56440c/spdlog/include/spdlog/fmt/bundled}/chrono.h +0 -0
- /data/ext/cache/{fmt/141a17a028e6c29914e109691389f6cf87f9cfe3/fmt/include/fmt → spdlog/7251ead404dccd824789f8f3a13df2a6fb56440c/spdlog/include/spdlog/fmt/bundled}/color.h +0 -0
- /data/ext/cache/{fmt/141a17a028e6c29914e109691389f6cf87f9cfe3/fmt/include/fmt → spdlog/7251ead404dccd824789f8f3a13df2a6fb56440c/spdlog/include/spdlog/fmt/bundled}/compile.h +0 -0
- /data/ext/cache/{fmt/141a17a028e6c29914e109691389f6cf87f9cfe3/fmt/include/fmt → spdlog/7251ead404dccd824789f8f3a13df2a6fb56440c/spdlog/include/spdlog/fmt/bundled}/core.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/fmt/bundled/fmt.license.rst +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/fmt/bundled/locale.h +0 -0
- /data/ext/cache/{fmt/141a17a028e6c29914e109691389f6cf87f9cfe3/fmt/include/fmt → spdlog/7251ead404dccd824789f8f3a13df2a6fb56440c/spdlog/include/spdlog/fmt/bundled}/os.h +0 -0
- /data/ext/cache/{fmt/141a17a028e6c29914e109691389f6cf87f9cfe3/fmt/include/fmt → spdlog/7251ead404dccd824789f8f3a13df2a6fb56440c/spdlog/include/spdlog/fmt/bundled}/ostream.h +0 -0
- /data/ext/cache/{fmt/141a17a028e6c29914e109691389f6cf87f9cfe3/fmt/include/fmt → spdlog/7251ead404dccd824789f8f3a13df2a6fb56440c/spdlog/include/spdlog/fmt/bundled}/printf.h +0 -0
- /data/ext/cache/{fmt/141a17a028e6c29914e109691389f6cf87f9cfe3/fmt/include/fmt → spdlog/7251ead404dccd824789f8f3a13df2a6fb56440c/spdlog/include/spdlog/fmt/bundled}/std.h +0 -0
- /data/ext/cache/{fmt/141a17a028e6c29914e109691389f6cf87f9cfe3/fmt/include/fmt → spdlog/7251ead404dccd824789f8f3a13df2a6fb56440c/spdlog/include/spdlog/fmt/bundled}/xchar.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/fmt/chrono.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/fmt/compile.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/fmt/fmt.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/fmt/ostr.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/fmt/ranges.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/fmt/std.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/fmt/xchar.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/formatter.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/fwd.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/logger-inl.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/logger.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/pattern_formatter.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/android_sink.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/ansicolor_sink-inl.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/base_sink-inl.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/basic_file_sink-inl.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/basic_file_sink.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/dist_sink.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/dup_filter_sink.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/kafka_sink.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/mongo_sink.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/null_sink.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/ostream_sink.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/qt_sinks.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/ringbuffer_sink.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/rotating_file_sink.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/sink-inl.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/sink.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/stdout_color_sinks-inl.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/stdout_color_sinks.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/stdout_sinks-inl.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/stdout_sinks.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/systemd_sink.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/tcp_sink.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/udp_sink.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/win_eventlog_sink.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/sinks/wincolor_sink.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/spdlog-inl.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/spdlog.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/stopwatch.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/include/spdlog/tweakme.h +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/src/async.cpp +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/src/cfg.cpp +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/src/color_sinks.cpp +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/src/file_sinks.cpp +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/src/spdlog.cpp +0 -0
- /data/ext/cache/spdlog/{19df5d3d8e5526c255d27414e09568671ef87483 → 7251ead404dccd824789f8f3a13df2a6fb56440c}/spdlog/src/stdout_sinks.cpp +0 -0
@@ -1,675 +0,0 @@
|
|
1
|
-
// Formatting library for C++ - legacy printf implementation
|
2
|
-
//
|
3
|
-
// Copyright (c) 2012 - 2016, Victor Zverovich
|
4
|
-
// All rights reserved.
|
5
|
-
//
|
6
|
-
// For the license information refer to format.h.
|
7
|
-
|
8
|
-
#ifndef FMT_PRINTF_H_
|
9
|
-
#define FMT_PRINTF_H_
|
10
|
-
|
11
|
-
#include <algorithm> // std::max
|
12
|
-
#include <limits> // std::numeric_limits
|
13
|
-
|
14
|
-
#include "format.h"
|
15
|
-
|
16
|
-
FMT_BEGIN_NAMESPACE
|
17
|
-
FMT_BEGIN_EXPORT
|
18
|
-
|
19
|
-
template <typename T> struct printf_formatter {
|
20
|
-
printf_formatter() = delete;
|
21
|
-
};
|
22
|
-
|
23
|
-
template <typename Char> class basic_printf_context {
|
24
|
-
private:
|
25
|
-
detail::buffer_appender<Char> out_;
|
26
|
-
basic_format_args<basic_printf_context> args_;
|
27
|
-
|
28
|
-
static_assert(std::is_same<Char, char>::value ||
|
29
|
-
std::is_same<Char, wchar_t>::value,
|
30
|
-
"Unsupported code unit type.");
|
31
|
-
|
32
|
-
public:
|
33
|
-
using char_type = Char;
|
34
|
-
using parse_context_type = basic_format_parse_context<Char>;
|
35
|
-
template <typename T> using formatter_type = printf_formatter<T>;
|
36
|
-
|
37
|
-
/**
|
38
|
-
\rst
|
39
|
-
Constructs a ``printf_context`` object. References to the arguments are
|
40
|
-
stored in the context object so make sure they have appropriate lifetimes.
|
41
|
-
\endrst
|
42
|
-
*/
|
43
|
-
basic_printf_context(detail::buffer_appender<Char> out,
|
44
|
-
basic_format_args<basic_printf_context> args)
|
45
|
-
: out_(out), args_(args) {}
|
46
|
-
|
47
|
-
auto out() -> detail::buffer_appender<Char> { return out_; }
|
48
|
-
void advance_to(detail::buffer_appender<Char>) {}
|
49
|
-
|
50
|
-
auto locale() -> detail::locale_ref { return {}; }
|
51
|
-
|
52
|
-
auto arg(int id) const -> basic_format_arg<basic_printf_context> {
|
53
|
-
return args_.get(id);
|
54
|
-
}
|
55
|
-
|
56
|
-
FMT_CONSTEXPR void on_error(const char* message) {
|
57
|
-
detail::error_handler().on_error(message);
|
58
|
-
}
|
59
|
-
};
|
60
|
-
|
61
|
-
namespace detail {
|
62
|
-
|
63
|
-
// Checks if a value fits in int - used to avoid warnings about comparing
|
64
|
-
// signed and unsigned integers.
|
65
|
-
template <bool IsSigned> struct int_checker {
|
66
|
-
template <typename T> static auto fits_in_int(T value) -> bool {
|
67
|
-
unsigned max = max_value<int>();
|
68
|
-
return value <= max;
|
69
|
-
}
|
70
|
-
static auto fits_in_int(bool) -> bool { return true; }
|
71
|
-
};
|
72
|
-
|
73
|
-
template <> struct int_checker<true> {
|
74
|
-
template <typename T> static auto fits_in_int(T value) -> bool {
|
75
|
-
return value >= (std::numeric_limits<int>::min)() &&
|
76
|
-
value <= max_value<int>();
|
77
|
-
}
|
78
|
-
static auto fits_in_int(int) -> bool { return true; }
|
79
|
-
};
|
80
|
-
|
81
|
-
struct printf_precision_handler {
|
82
|
-
template <typename T, FMT_ENABLE_IF(std::is_integral<T>::value)>
|
83
|
-
auto operator()(T value) -> int {
|
84
|
-
if (!int_checker<std::numeric_limits<T>::is_signed>::fits_in_int(value))
|
85
|
-
throw_format_error("number is too big");
|
86
|
-
return (std::max)(static_cast<int>(value), 0);
|
87
|
-
}
|
88
|
-
|
89
|
-
template <typename T, FMT_ENABLE_IF(!std::is_integral<T>::value)>
|
90
|
-
auto operator()(T) -> int {
|
91
|
-
throw_format_error("precision is not integer");
|
92
|
-
return 0;
|
93
|
-
}
|
94
|
-
};
|
95
|
-
|
96
|
-
// An argument visitor that returns true iff arg is a zero integer.
|
97
|
-
struct is_zero_int {
|
98
|
-
template <typename T, FMT_ENABLE_IF(std::is_integral<T>::value)>
|
99
|
-
auto operator()(T value) -> bool {
|
100
|
-
return value == 0;
|
101
|
-
}
|
102
|
-
|
103
|
-
template <typename T, FMT_ENABLE_IF(!std::is_integral<T>::value)>
|
104
|
-
auto operator()(T) -> bool {
|
105
|
-
return false;
|
106
|
-
}
|
107
|
-
};
|
108
|
-
|
109
|
-
template <typename T> struct make_unsigned_or_bool : std::make_unsigned<T> {};
|
110
|
-
|
111
|
-
template <> struct make_unsigned_or_bool<bool> {
|
112
|
-
using type = bool;
|
113
|
-
};
|
114
|
-
|
115
|
-
template <typename T, typename Context> class arg_converter {
|
116
|
-
private:
|
117
|
-
using char_type = typename Context::char_type;
|
118
|
-
|
119
|
-
basic_format_arg<Context>& arg_;
|
120
|
-
char_type type_;
|
121
|
-
|
122
|
-
public:
|
123
|
-
arg_converter(basic_format_arg<Context>& arg, char_type type)
|
124
|
-
: arg_(arg), type_(type) {}
|
125
|
-
|
126
|
-
void operator()(bool value) {
|
127
|
-
if (type_ != 's') operator()<bool>(value);
|
128
|
-
}
|
129
|
-
|
130
|
-
template <typename U, FMT_ENABLE_IF(std::is_integral<U>::value)>
|
131
|
-
void operator()(U value) {
|
132
|
-
bool is_signed = type_ == 'd' || type_ == 'i';
|
133
|
-
using target_type = conditional_t<std::is_same<T, void>::value, U, T>;
|
134
|
-
if (const_check(sizeof(target_type) <= sizeof(int))) {
|
135
|
-
// Extra casts are used to silence warnings.
|
136
|
-
if (is_signed) {
|
137
|
-
auto n = static_cast<int>(static_cast<target_type>(value));
|
138
|
-
arg_ = detail::make_arg<Context>(n);
|
139
|
-
} else {
|
140
|
-
using unsigned_type = typename make_unsigned_or_bool<target_type>::type;
|
141
|
-
auto n = static_cast<unsigned>(static_cast<unsigned_type>(value));
|
142
|
-
arg_ = detail::make_arg<Context>(n);
|
143
|
-
}
|
144
|
-
} else {
|
145
|
-
if (is_signed) {
|
146
|
-
// glibc's printf doesn't sign extend arguments of smaller types:
|
147
|
-
// std::printf("%lld", -42); // prints "4294967254"
|
148
|
-
// but we don't have to do the same because it's a UB.
|
149
|
-
auto n = static_cast<long long>(value);
|
150
|
-
arg_ = detail::make_arg<Context>(n);
|
151
|
-
} else {
|
152
|
-
auto n = static_cast<typename make_unsigned_or_bool<U>::type>(value);
|
153
|
-
arg_ = detail::make_arg<Context>(n);
|
154
|
-
}
|
155
|
-
}
|
156
|
-
}
|
157
|
-
|
158
|
-
template <typename U, FMT_ENABLE_IF(!std::is_integral<U>::value)>
|
159
|
-
void operator()(U) {} // No conversion needed for non-integral types.
|
160
|
-
};
|
161
|
-
|
162
|
-
// Converts an integer argument to T for printf, if T is an integral type.
|
163
|
-
// If T is void, the argument is converted to corresponding signed or unsigned
|
164
|
-
// type depending on the type specifier: 'd' and 'i' - signed, other -
|
165
|
-
// unsigned).
|
166
|
-
template <typename T, typename Context, typename Char>
|
167
|
-
void convert_arg(basic_format_arg<Context>& arg, Char type) {
|
168
|
-
visit_format_arg(arg_converter<T, Context>(arg, type), arg);
|
169
|
-
}
|
170
|
-
|
171
|
-
// Converts an integer argument to char for printf.
|
172
|
-
template <typename Context> class char_converter {
|
173
|
-
private:
|
174
|
-
basic_format_arg<Context>& arg_;
|
175
|
-
|
176
|
-
public:
|
177
|
-
explicit char_converter(basic_format_arg<Context>& arg) : arg_(arg) {}
|
178
|
-
|
179
|
-
template <typename T, FMT_ENABLE_IF(std::is_integral<T>::value)>
|
180
|
-
void operator()(T value) {
|
181
|
-
auto c = static_cast<typename Context::char_type>(value);
|
182
|
-
arg_ = detail::make_arg<Context>(c);
|
183
|
-
}
|
184
|
-
|
185
|
-
template <typename T, FMT_ENABLE_IF(!std::is_integral<T>::value)>
|
186
|
-
void operator()(T) {} // No conversion needed for non-integral types.
|
187
|
-
};
|
188
|
-
|
189
|
-
// An argument visitor that return a pointer to a C string if argument is a
|
190
|
-
// string or null otherwise.
|
191
|
-
template <typename Char> struct get_cstring {
|
192
|
-
template <typename T> auto operator()(T) -> const Char* { return nullptr; }
|
193
|
-
auto operator()(const Char* s) -> const Char* { return s; }
|
194
|
-
};
|
195
|
-
|
196
|
-
// Checks if an argument is a valid printf width specifier and sets
|
197
|
-
// left alignment if it is negative.
|
198
|
-
template <typename Char> class printf_width_handler {
|
199
|
-
private:
|
200
|
-
format_specs<Char>& specs_;
|
201
|
-
|
202
|
-
public:
|
203
|
-
explicit printf_width_handler(format_specs<Char>& specs) : specs_(specs) {}
|
204
|
-
|
205
|
-
template <typename T, FMT_ENABLE_IF(std::is_integral<T>::value)>
|
206
|
-
auto operator()(T value) -> unsigned {
|
207
|
-
auto width = static_cast<uint32_or_64_or_128_t<T>>(value);
|
208
|
-
if (detail::is_negative(value)) {
|
209
|
-
specs_.align = align::left;
|
210
|
-
width = 0 - width;
|
211
|
-
}
|
212
|
-
unsigned int_max = max_value<int>();
|
213
|
-
if (width > int_max) throw_format_error("number is too big");
|
214
|
-
return static_cast<unsigned>(width);
|
215
|
-
}
|
216
|
-
|
217
|
-
template <typename T, FMT_ENABLE_IF(!std::is_integral<T>::value)>
|
218
|
-
auto operator()(T) -> unsigned {
|
219
|
-
throw_format_error("width is not integer");
|
220
|
-
return 0;
|
221
|
-
}
|
222
|
-
};
|
223
|
-
|
224
|
-
// Workaround for a bug with the XL compiler when initializing
|
225
|
-
// printf_arg_formatter's base class.
|
226
|
-
template <typename Char>
|
227
|
-
auto make_arg_formatter(buffer_appender<Char> iter, format_specs<Char>& s)
|
228
|
-
-> arg_formatter<Char> {
|
229
|
-
return {iter, s, locale_ref()};
|
230
|
-
}
|
231
|
-
|
232
|
-
// The ``printf`` argument formatter.
|
233
|
-
template <typename Char>
|
234
|
-
class printf_arg_formatter : public arg_formatter<Char> {
|
235
|
-
private:
|
236
|
-
using base = arg_formatter<Char>;
|
237
|
-
using context_type = basic_printf_context<Char>;
|
238
|
-
|
239
|
-
context_type& context_;
|
240
|
-
|
241
|
-
void write_null_pointer(bool is_string = false) {
|
242
|
-
auto s = this->specs;
|
243
|
-
s.type = presentation_type::none;
|
244
|
-
write_bytes(this->out, is_string ? "(null)" : "(nil)", s);
|
245
|
-
}
|
246
|
-
|
247
|
-
public:
|
248
|
-
printf_arg_formatter(buffer_appender<Char> iter, format_specs<Char>& s,
|
249
|
-
context_type& ctx)
|
250
|
-
: base(make_arg_formatter(iter, s)), context_(ctx) {}
|
251
|
-
|
252
|
-
void operator()(monostate value) { base::operator()(value); }
|
253
|
-
|
254
|
-
template <typename T, FMT_ENABLE_IF(detail::is_integral<T>::value)>
|
255
|
-
void operator()(T value) {
|
256
|
-
// MSVC2013 fails to compile separate overloads for bool and Char so use
|
257
|
-
// std::is_same instead.
|
258
|
-
if (!std::is_same<T, Char>::value) {
|
259
|
-
base::operator()(value);
|
260
|
-
return;
|
261
|
-
}
|
262
|
-
format_specs<Char> fmt_specs = this->specs;
|
263
|
-
if (fmt_specs.type != presentation_type::none &&
|
264
|
-
fmt_specs.type != presentation_type::chr) {
|
265
|
-
return (*this)(static_cast<int>(value));
|
266
|
-
}
|
267
|
-
fmt_specs.sign = sign::none;
|
268
|
-
fmt_specs.alt = false;
|
269
|
-
fmt_specs.fill[0] = ' '; // Ignore '0' flag for char types.
|
270
|
-
// align::numeric needs to be overwritten here since the '0' flag is
|
271
|
-
// ignored for non-numeric types
|
272
|
-
if (fmt_specs.align == align::none || fmt_specs.align == align::numeric)
|
273
|
-
fmt_specs.align = align::right;
|
274
|
-
write<Char>(this->out, static_cast<Char>(value), fmt_specs);
|
275
|
-
}
|
276
|
-
|
277
|
-
template <typename T, FMT_ENABLE_IF(std::is_floating_point<T>::value)>
|
278
|
-
void operator()(T value) {
|
279
|
-
base::operator()(value);
|
280
|
-
}
|
281
|
-
|
282
|
-
/** Formats a null-terminated C string. */
|
283
|
-
void operator()(const char* value) {
|
284
|
-
if (value)
|
285
|
-
base::operator()(value);
|
286
|
-
else
|
287
|
-
write_null_pointer(this->specs.type != presentation_type::pointer);
|
288
|
-
}
|
289
|
-
|
290
|
-
/** Formats a null-terminated wide C string. */
|
291
|
-
void operator()(const wchar_t* value) {
|
292
|
-
if (value)
|
293
|
-
base::operator()(value);
|
294
|
-
else
|
295
|
-
write_null_pointer(this->specs.type != presentation_type::pointer);
|
296
|
-
}
|
297
|
-
|
298
|
-
void operator()(basic_string_view<Char> value) { base::operator()(value); }
|
299
|
-
|
300
|
-
/** Formats a pointer. */
|
301
|
-
void operator()(const void* value) {
|
302
|
-
if (value)
|
303
|
-
base::operator()(value);
|
304
|
-
else
|
305
|
-
write_null_pointer();
|
306
|
-
}
|
307
|
-
|
308
|
-
/** Formats an argument of a custom (user-defined) type. */
|
309
|
-
void operator()(typename basic_format_arg<context_type>::handle handle) {
|
310
|
-
auto parse_ctx = basic_format_parse_context<Char>({});
|
311
|
-
handle.format(parse_ctx, context_);
|
312
|
-
}
|
313
|
-
};
|
314
|
-
|
315
|
-
template <typename Char>
|
316
|
-
void parse_flags(format_specs<Char>& specs, const Char*& it, const Char* end) {
|
317
|
-
for (; it != end; ++it) {
|
318
|
-
switch (*it) {
|
319
|
-
case '-':
|
320
|
-
specs.align = align::left;
|
321
|
-
break;
|
322
|
-
case '+':
|
323
|
-
specs.sign = sign::plus;
|
324
|
-
break;
|
325
|
-
case '0':
|
326
|
-
specs.fill[0] = '0';
|
327
|
-
break;
|
328
|
-
case ' ':
|
329
|
-
if (specs.sign != sign::plus) specs.sign = sign::space;
|
330
|
-
break;
|
331
|
-
case '#':
|
332
|
-
specs.alt = true;
|
333
|
-
break;
|
334
|
-
default:
|
335
|
-
return;
|
336
|
-
}
|
337
|
-
}
|
338
|
-
}
|
339
|
-
|
340
|
-
template <typename Char, typename GetArg>
|
341
|
-
auto parse_header(const Char*& it, const Char* end, format_specs<Char>& specs,
|
342
|
-
GetArg get_arg) -> int {
|
343
|
-
int arg_index = -1;
|
344
|
-
Char c = *it;
|
345
|
-
if (c >= '0' && c <= '9') {
|
346
|
-
// Parse an argument index (if followed by '$') or a width possibly
|
347
|
-
// preceded with '0' flag(s).
|
348
|
-
int value = parse_nonnegative_int(it, end, -1);
|
349
|
-
if (it != end && *it == '$') { // value is an argument index
|
350
|
-
++it;
|
351
|
-
arg_index = value != -1 ? value : max_value<int>();
|
352
|
-
} else {
|
353
|
-
if (c == '0') specs.fill[0] = '0';
|
354
|
-
if (value != 0) {
|
355
|
-
// Nonzero value means that we parsed width and don't need to
|
356
|
-
// parse it or flags again, so return now.
|
357
|
-
if (value == -1) throw_format_error("number is too big");
|
358
|
-
specs.width = value;
|
359
|
-
return arg_index;
|
360
|
-
}
|
361
|
-
}
|
362
|
-
}
|
363
|
-
parse_flags(specs, it, end);
|
364
|
-
// Parse width.
|
365
|
-
if (it != end) {
|
366
|
-
if (*it >= '0' && *it <= '9') {
|
367
|
-
specs.width = parse_nonnegative_int(it, end, -1);
|
368
|
-
if (specs.width == -1) throw_format_error("number is too big");
|
369
|
-
} else if (*it == '*') {
|
370
|
-
++it;
|
371
|
-
specs.width = static_cast<int>(visit_format_arg(
|
372
|
-
detail::printf_width_handler<Char>(specs), get_arg(-1)));
|
373
|
-
}
|
374
|
-
}
|
375
|
-
return arg_index;
|
376
|
-
}
|
377
|
-
|
378
|
-
inline auto parse_printf_presentation_type(char c, type t)
|
379
|
-
-> presentation_type {
|
380
|
-
using pt = presentation_type;
|
381
|
-
constexpr auto integral_set = sint_set | uint_set | bool_set | char_set;
|
382
|
-
switch (c) {
|
383
|
-
case 'd':
|
384
|
-
return in(t, integral_set) ? pt::dec : pt::none;
|
385
|
-
case 'o':
|
386
|
-
return in(t, integral_set) ? pt::oct : pt::none;
|
387
|
-
case 'x':
|
388
|
-
return in(t, integral_set) ? pt::hex_lower : pt::none;
|
389
|
-
case 'X':
|
390
|
-
return in(t, integral_set) ? pt::hex_upper : pt::none;
|
391
|
-
case 'a':
|
392
|
-
return in(t, float_set) ? pt::hexfloat_lower : pt::none;
|
393
|
-
case 'A':
|
394
|
-
return in(t, float_set) ? pt::hexfloat_upper : pt::none;
|
395
|
-
case 'e':
|
396
|
-
return in(t, float_set) ? pt::exp_lower : pt::none;
|
397
|
-
case 'E':
|
398
|
-
return in(t, float_set) ? pt::exp_upper : pt::none;
|
399
|
-
case 'f':
|
400
|
-
return in(t, float_set) ? pt::fixed_lower : pt::none;
|
401
|
-
case 'F':
|
402
|
-
return in(t, float_set) ? pt::fixed_upper : pt::none;
|
403
|
-
case 'g':
|
404
|
-
return in(t, float_set) ? pt::general_lower : pt::none;
|
405
|
-
case 'G':
|
406
|
-
return in(t, float_set) ? pt::general_upper : pt::none;
|
407
|
-
case 'c':
|
408
|
-
return in(t, integral_set) ? pt::chr : pt::none;
|
409
|
-
case 's':
|
410
|
-
return in(t, string_set | cstring_set) ? pt::string : pt::none;
|
411
|
-
case 'p':
|
412
|
-
return in(t, pointer_set | cstring_set) ? pt::pointer : pt::none;
|
413
|
-
default:
|
414
|
-
return pt::none;
|
415
|
-
}
|
416
|
-
}
|
417
|
-
|
418
|
-
template <typename Char, typename Context>
|
419
|
-
void vprintf(buffer<Char>& buf, basic_string_view<Char> format,
|
420
|
-
basic_format_args<Context> args) {
|
421
|
-
using iterator = buffer_appender<Char>;
|
422
|
-
auto out = iterator(buf);
|
423
|
-
auto context = basic_printf_context<Char>(out, args);
|
424
|
-
auto parse_ctx = basic_format_parse_context<Char>(format);
|
425
|
-
|
426
|
-
// Returns the argument with specified index or, if arg_index is -1, the next
|
427
|
-
// argument.
|
428
|
-
auto get_arg = [&](int arg_index) {
|
429
|
-
if (arg_index < 0)
|
430
|
-
arg_index = parse_ctx.next_arg_id();
|
431
|
-
else
|
432
|
-
parse_ctx.check_arg_id(--arg_index);
|
433
|
-
return detail::get_arg(context, arg_index);
|
434
|
-
};
|
435
|
-
|
436
|
-
const Char* start = parse_ctx.begin();
|
437
|
-
const Char* end = parse_ctx.end();
|
438
|
-
auto it = start;
|
439
|
-
while (it != end) {
|
440
|
-
if (!find<false, Char>(it, end, '%', it)) {
|
441
|
-
it = end; // find leaves it == nullptr if it doesn't find '%'.
|
442
|
-
break;
|
443
|
-
}
|
444
|
-
Char c = *it++;
|
445
|
-
if (it != end && *it == c) {
|
446
|
-
write(out, basic_string_view<Char>(start, to_unsigned(it - start)));
|
447
|
-
start = ++it;
|
448
|
-
continue;
|
449
|
-
}
|
450
|
-
write(out, basic_string_view<Char>(start, to_unsigned(it - 1 - start)));
|
451
|
-
|
452
|
-
auto specs = format_specs<Char>();
|
453
|
-
specs.align = align::right;
|
454
|
-
|
455
|
-
// Parse argument index, flags and width.
|
456
|
-
int arg_index = parse_header(it, end, specs, get_arg);
|
457
|
-
if (arg_index == 0) throw_format_error("argument not found");
|
458
|
-
|
459
|
-
// Parse precision.
|
460
|
-
if (it != end && *it == '.') {
|
461
|
-
++it;
|
462
|
-
c = it != end ? *it : 0;
|
463
|
-
if ('0' <= c && c <= '9') {
|
464
|
-
specs.precision = parse_nonnegative_int(it, end, 0);
|
465
|
-
} else if (c == '*') {
|
466
|
-
++it;
|
467
|
-
specs.precision = static_cast<int>(
|
468
|
-
visit_format_arg(printf_precision_handler(), get_arg(-1)));
|
469
|
-
} else {
|
470
|
-
specs.precision = 0;
|
471
|
-
}
|
472
|
-
}
|
473
|
-
|
474
|
-
auto arg = get_arg(arg_index);
|
475
|
-
// For d, i, o, u, x, and X conversion specifiers, if a precision is
|
476
|
-
// specified, the '0' flag is ignored
|
477
|
-
if (specs.precision >= 0 && arg.is_integral()) {
|
478
|
-
// Ignore '0' for non-numeric types or if '-' present.
|
479
|
-
specs.fill[0] = ' ';
|
480
|
-
}
|
481
|
-
if (specs.precision >= 0 && arg.type() == type::cstring_type) {
|
482
|
-
auto str = visit_format_arg(get_cstring<Char>(), arg);
|
483
|
-
auto str_end = str + specs.precision;
|
484
|
-
auto nul = std::find(str, str_end, Char());
|
485
|
-
auto sv = basic_string_view<Char>(
|
486
|
-
str, to_unsigned(nul != str_end ? nul - str : specs.precision));
|
487
|
-
arg = make_arg<basic_printf_context<Char>>(sv);
|
488
|
-
}
|
489
|
-
if (specs.alt && visit_format_arg(is_zero_int(), arg)) specs.alt = false;
|
490
|
-
if (specs.fill[0] == '0') {
|
491
|
-
if (arg.is_arithmetic() && specs.align != align::left)
|
492
|
-
specs.align = align::numeric;
|
493
|
-
else
|
494
|
-
specs.fill[0] = ' '; // Ignore '0' flag for non-numeric types or if '-'
|
495
|
-
// flag is also present.
|
496
|
-
}
|
497
|
-
|
498
|
-
// Parse length and convert the argument to the required type.
|
499
|
-
c = it != end ? *it++ : 0;
|
500
|
-
Char t = it != end ? *it : 0;
|
501
|
-
switch (c) {
|
502
|
-
case 'h':
|
503
|
-
if (t == 'h') {
|
504
|
-
++it;
|
505
|
-
t = it != end ? *it : 0;
|
506
|
-
convert_arg<signed char>(arg, t);
|
507
|
-
} else {
|
508
|
-
convert_arg<short>(arg, t);
|
509
|
-
}
|
510
|
-
break;
|
511
|
-
case 'l':
|
512
|
-
if (t == 'l') {
|
513
|
-
++it;
|
514
|
-
t = it != end ? *it : 0;
|
515
|
-
convert_arg<long long>(arg, t);
|
516
|
-
} else {
|
517
|
-
convert_arg<long>(arg, t);
|
518
|
-
}
|
519
|
-
break;
|
520
|
-
case 'j':
|
521
|
-
convert_arg<intmax_t>(arg, t);
|
522
|
-
break;
|
523
|
-
case 'z':
|
524
|
-
convert_arg<size_t>(arg, t);
|
525
|
-
break;
|
526
|
-
case 't':
|
527
|
-
convert_arg<std::ptrdiff_t>(arg, t);
|
528
|
-
break;
|
529
|
-
case 'L':
|
530
|
-
// printf produces garbage when 'L' is omitted for long double, no
|
531
|
-
// need to do the same.
|
532
|
-
break;
|
533
|
-
default:
|
534
|
-
--it;
|
535
|
-
convert_arg<void>(arg, c);
|
536
|
-
}
|
537
|
-
|
538
|
-
// Parse type.
|
539
|
-
if (it == end) throw_format_error("invalid format string");
|
540
|
-
char type = static_cast<char>(*it++);
|
541
|
-
if (arg.is_integral()) {
|
542
|
-
// Normalize type.
|
543
|
-
switch (type) {
|
544
|
-
case 'i':
|
545
|
-
case 'u':
|
546
|
-
type = 'd';
|
547
|
-
break;
|
548
|
-
case 'c':
|
549
|
-
visit_format_arg(char_converter<basic_printf_context<Char>>(arg), arg);
|
550
|
-
break;
|
551
|
-
}
|
552
|
-
}
|
553
|
-
specs.type = parse_printf_presentation_type(type, arg.type());
|
554
|
-
if (specs.type == presentation_type::none)
|
555
|
-
throw_format_error("invalid format specifier");
|
556
|
-
|
557
|
-
start = it;
|
558
|
-
|
559
|
-
// Format argument.
|
560
|
-
visit_format_arg(printf_arg_formatter<Char>(out, specs, context), arg);
|
561
|
-
}
|
562
|
-
write(out, basic_string_view<Char>(start, to_unsigned(it - start)));
|
563
|
-
}
|
564
|
-
} // namespace detail
|
565
|
-
|
566
|
-
using printf_context = basic_printf_context<char>;
|
567
|
-
using wprintf_context = basic_printf_context<wchar_t>;
|
568
|
-
|
569
|
-
using printf_args = basic_format_args<printf_context>;
|
570
|
-
using wprintf_args = basic_format_args<wprintf_context>;
|
571
|
-
|
572
|
-
/**
|
573
|
-
\rst
|
574
|
-
Constructs an `~fmt::format_arg_store` object that contains references to
|
575
|
-
arguments and can be implicitly converted to `~fmt::printf_args`.
|
576
|
-
\endrst
|
577
|
-
*/
|
578
|
-
template <typename... T>
|
579
|
-
inline auto make_printf_args(const T&... args)
|
580
|
-
-> format_arg_store<printf_context, T...> {
|
581
|
-
return {args...};
|
582
|
-
}
|
583
|
-
|
584
|
-
// DEPRECATED!
|
585
|
-
template <typename... T>
|
586
|
-
inline auto make_wprintf_args(const T&... args)
|
587
|
-
-> format_arg_store<wprintf_context, T...> {
|
588
|
-
return {args...};
|
589
|
-
}
|
590
|
-
|
591
|
-
template <typename Char>
|
592
|
-
inline auto vsprintf(
|
593
|
-
basic_string_view<Char> fmt,
|
594
|
-
basic_format_args<basic_printf_context<type_identity_t<Char>>> args)
|
595
|
-
-> std::basic_string<Char> {
|
596
|
-
auto buf = basic_memory_buffer<Char>();
|
597
|
-
detail::vprintf(buf, fmt, args);
|
598
|
-
return to_string(buf);
|
599
|
-
}
|
600
|
-
|
601
|
-
/**
|
602
|
-
\rst
|
603
|
-
Formats arguments and returns the result as a string.
|
604
|
-
|
605
|
-
**Example**::
|
606
|
-
|
607
|
-
std::string message = fmt::sprintf("The answer is %d", 42);
|
608
|
-
\endrst
|
609
|
-
*/
|
610
|
-
template <typename S, typename... T,
|
611
|
-
typename Char = enable_if_t<detail::is_string<S>::value, char_t<S>>>
|
612
|
-
inline auto sprintf(const S& fmt, const T&... args) -> std::basic_string<Char> {
|
613
|
-
return vsprintf(detail::to_string_view(fmt),
|
614
|
-
fmt::make_format_args<basic_printf_context<Char>>(args...));
|
615
|
-
}
|
616
|
-
|
617
|
-
template <typename Char>
|
618
|
-
inline auto vfprintf(
|
619
|
-
std::FILE* f, basic_string_view<Char> fmt,
|
620
|
-
basic_format_args<basic_printf_context<type_identity_t<Char>>> args)
|
621
|
-
-> int {
|
622
|
-
auto buf = basic_memory_buffer<Char>();
|
623
|
-
detail::vprintf(buf, fmt, args);
|
624
|
-
size_t size = buf.size();
|
625
|
-
return std::fwrite(buf.data(), sizeof(Char), size, f) < size
|
626
|
-
? -1
|
627
|
-
: static_cast<int>(size);
|
628
|
-
}
|
629
|
-
|
630
|
-
/**
|
631
|
-
\rst
|
632
|
-
Prints formatted data to the file *f*.
|
633
|
-
|
634
|
-
**Example**::
|
635
|
-
|
636
|
-
fmt::fprintf(stderr, "Don't %s!", "panic");
|
637
|
-
\endrst
|
638
|
-
*/
|
639
|
-
template <typename S, typename... T, typename Char = char_t<S>>
|
640
|
-
inline auto fprintf(std::FILE* f, const S& fmt, const T&... args) -> int {
|
641
|
-
return vfprintf(f, detail::to_string_view(fmt),
|
642
|
-
fmt::make_format_args<basic_printf_context<Char>>(args...));
|
643
|
-
}
|
644
|
-
|
645
|
-
template <typename Char>
|
646
|
-
FMT_DEPRECATED inline auto vprintf(
|
647
|
-
basic_string_view<Char> fmt,
|
648
|
-
basic_format_args<basic_printf_context<type_identity_t<Char>>> args)
|
649
|
-
-> int {
|
650
|
-
return vfprintf(stdout, fmt, args);
|
651
|
-
}
|
652
|
-
|
653
|
-
/**
|
654
|
-
\rst
|
655
|
-
Prints formatted data to ``stdout``.
|
656
|
-
|
657
|
-
**Example**::
|
658
|
-
|
659
|
-
fmt::printf("Elapsed time: %.2f seconds", 1.23);
|
660
|
-
\endrst
|
661
|
-
*/
|
662
|
-
template <typename... T>
|
663
|
-
inline auto printf(string_view fmt, const T&... args) -> int {
|
664
|
-
return vfprintf(stdout, fmt, make_printf_args(args...));
|
665
|
-
}
|
666
|
-
template <typename... T>
|
667
|
-
FMT_DEPRECATED inline auto printf(basic_string_view<wchar_t> fmt,
|
668
|
-
const T&... args) -> int {
|
669
|
-
return vfprintf(stdout, fmt, make_wprintf_args(args...));
|
670
|
-
}
|
671
|
-
|
672
|
-
FMT_END_EXPORT
|
673
|
-
FMT_END_NAMESPACE
|
674
|
-
|
675
|
-
#endif // FMT_PRINTF_H_
|