couchbase 1.3.15 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1897) hide show
  1. checksums.yaml +5 -5
  2. data/LICENSE.txt +202 -0
  3. data/README.md +130 -0
  4. data/ext/CMakeLists.txt +66 -0
  5. data/ext/couchbase/CMakeLists.txt +142 -0
  6. data/ext/couchbase/LICENSE.txt +202 -0
  7. data/ext/couchbase/cmake/Backtrace.cmake +35 -0
  8. data/ext/couchbase/cmake/BuildTracing.cmake +6 -0
  9. data/ext/couchbase/cmake/Cache.cmake +29 -0
  10. data/ext/couchbase/cmake/CompilerWarnings.cmake +83 -0
  11. data/ext/couchbase/cmake/DetectStandardFilesystem.cmake +30 -0
  12. data/ext/couchbase/cmake/OpenSSL.cmake +24 -0
  13. data/ext/couchbase/cmake/PreventInSourceBuilds.cmake +21 -0
  14. data/ext/couchbase/cmake/Sanitizers.cmake +67 -0
  15. data/ext/couchbase/cmake/StandardProjectSettings.cmake +45 -0
  16. data/ext/couchbase/cmake/StaticAnalyzers.cmake +37 -0
  17. data/ext/couchbase/cmake/Testing.cmake +63 -0
  18. data/ext/couchbase/cmake/ThirdPartyDependencies.cmake +44 -0
  19. data/ext/couchbase/cmake/VersionInfo.cmake +46 -0
  20. data/ext/couchbase/cmake/build_config.hxx.in +20 -0
  21. data/ext/couchbase/cmake/build_version.hxx.in +32 -0
  22. data/ext/couchbase/cmake/test_filesystem.cpp.in +22 -0
  23. data/ext/couchbase/couchbase/analytics_scan_consistency.hxx +26 -0
  24. data/ext/couchbase/couchbase/bucket.hxx +536 -0
  25. data/ext/couchbase/couchbase/capella_ca.hxx +43 -0
  26. data/ext/couchbase/couchbase/cas.hxx +47 -0
  27. data/ext/couchbase/couchbase/cas_fmt.hxx +37 -0
  28. data/ext/couchbase/couchbase/cluster.cxx +111 -0
  29. data/ext/couchbase/couchbase/cluster.hxx +423 -0
  30. data/ext/couchbase/couchbase/cluster_options.cxx +45 -0
  31. data/ext/couchbase/couchbase/cluster_options.hxx +78 -0
  32. data/ext/couchbase/couchbase/crypto/CMakeLists.txt +12 -0
  33. data/ext/couchbase/couchbase/crypto/cbcrypto.cc +887 -0
  34. data/ext/couchbase/couchbase/crypto/cbcrypto.h +88 -0
  35. data/ext/couchbase/couchbase/design_document_namespace.hxx +26 -0
  36. data/ext/couchbase/couchbase/design_document_namespace_fmt.hxx +47 -0
  37. data/ext/couchbase/couchbase/diagnostics.hxx +97 -0
  38. data/ext/couchbase/couchbase/diagnostics_fmt.hxx +113 -0
  39. data/ext/couchbase/couchbase/diagnostics_json.hxx +100 -0
  40. data/ext/couchbase/couchbase/document_id.cxx +89 -0
  41. data/ext/couchbase/couchbase/document_id.hxx +102 -0
  42. data/ext/couchbase/couchbase/document_id_fmt.hxx +37 -0
  43. data/ext/couchbase/couchbase/error_context/analytics.hxx +51 -0
  44. data/ext/couchbase/couchbase/error_context/http.hxx +47 -0
  45. data/ext/couchbase/couchbase/error_context/key_value.hxx +50 -0
  46. data/ext/couchbase/couchbase/error_context/query.hxx +51 -0
  47. data/ext/couchbase/couchbase/error_context/search.hxx +50 -0
  48. data/ext/couchbase/couchbase/error_context/view.hxx +51 -0
  49. data/ext/couchbase/couchbase/errors.hxx +1038 -0
  50. data/ext/couchbase/couchbase/io/CMakeLists.txt +12 -0
  51. data/ext/couchbase/couchbase/io/dns_client.hxx +217 -0
  52. data/ext/couchbase/couchbase/io/dns_codec.hxx +206 -0
  53. data/ext/couchbase/couchbase/io/dns_config.hxx +115 -0
  54. data/ext/couchbase/couchbase/io/dns_message.hxx +555 -0
  55. data/ext/couchbase/couchbase/io/http_command.hxx +174 -0
  56. data/ext/couchbase/couchbase/io/http_context.hxx +40 -0
  57. data/ext/couchbase/couchbase/io/http_message.hxx +116 -0
  58. data/ext/couchbase/couchbase/io/http_parser.cxx +141 -0
  59. data/ext/couchbase/couchbase/io/http_parser.hxx +55 -0
  60. data/ext/couchbase/couchbase/io/http_session.hxx +544 -0
  61. data/ext/couchbase/couchbase/io/http_session_manager.hxx +377 -0
  62. data/ext/couchbase/couchbase/io/http_traits.hxx +30 -0
  63. data/ext/couchbase/couchbase/io/ip_protocol.hxx +28 -0
  64. data/ext/couchbase/couchbase/io/mcbp_command.hxx +300 -0
  65. data/ext/couchbase/couchbase/io/mcbp_context.hxx +39 -0
  66. data/ext/couchbase/couchbase/io/mcbp_message.cxx +39 -0
  67. data/ext/couchbase/couchbase/io/mcbp_message.hxx +55 -0
  68. data/ext/couchbase/couchbase/io/mcbp_parser.cxx +86 -0
  69. data/ext/couchbase/couchbase/io/mcbp_parser.hxx +45 -0
  70. data/ext/couchbase/couchbase/io/mcbp_session.hxx +1317 -0
  71. data/ext/couchbase/couchbase/io/mcbp_traits.hxx +30 -0
  72. data/ext/couchbase/couchbase/io/query_cache.hxx +61 -0
  73. data/ext/couchbase/couchbase/io/retry_action.hxx +30 -0
  74. data/ext/couchbase/couchbase/io/retry_context.hxx +38 -0
  75. data/ext/couchbase/couchbase/io/retry_orchestrator.hxx +112 -0
  76. data/ext/couchbase/couchbase/io/retry_reason.hxx +158 -0
  77. data/ext/couchbase/couchbase/io/retry_reason_fmt.hxx +103 -0
  78. data/ext/couchbase/couchbase/io/retry_strategy.hxx +152 -0
  79. data/ext/couchbase/couchbase/io/streams.hxx +253 -0
  80. data/ext/couchbase/couchbase/json_string.hxx +48 -0
  81. data/ext/couchbase/couchbase/logger/CMakeLists.txt +9 -0
  82. data/ext/couchbase/couchbase/logger/configuration.hxx +52 -0
  83. data/ext/couchbase/couchbase/logger/custom_rotating_file_sink.cxx +157 -0
  84. data/ext/couchbase/couchbase/logger/custom_rotating_file_sink.hxx +76 -0
  85. data/ext/couchbase/couchbase/logger/logger.cxx +337 -0
  86. data/ext/couchbase/couchbase/logger/logger.hxx +235 -0
  87. data/ext/couchbase/couchbase/management/CMakeLists.txt +13 -0
  88. data/ext/couchbase/couchbase/management/analytics_dataset.hxx +30 -0
  89. data/ext/couchbase/couchbase/management/analytics_index.hxx +30 -0
  90. data/ext/couchbase/couchbase/management/analytics_link.hxx +22 -0
  91. data/ext/couchbase/couchbase/management/analytics_link_azure_blob_external.cxx +67 -0
  92. data/ext/couchbase/couchbase/management/analytics_link_azure_blob_external.hxx +76 -0
  93. data/ext/couchbase/couchbase/management/analytics_link_azure_blob_external_json.hxx +52 -0
  94. data/ext/couchbase/couchbase/management/analytics_link_couchbase_remote.cxx +104 -0
  95. data/ext/couchbase/couchbase/management/analytics_link_couchbase_remote.hxx +107 -0
  96. data/ext/couchbase/couchbase/management/analytics_link_couchbase_remote_json.hxx +63 -0
  97. data/ext/couchbase/couchbase/management/analytics_link_s3_external.cxx +57 -0
  98. data/ext/couchbase/couchbase/management/analytics_link_s3_external.hxx +69 -0
  99. data/ext/couchbase/couchbase/management/analytics_link_s3_external_json.hxx +47 -0
  100. data/ext/couchbase/couchbase/management/bucket_settings.hxx +134 -0
  101. data/ext/couchbase/couchbase/management/bucket_settings_json.hxx +123 -0
  102. data/ext/couchbase/couchbase/management/design_document.hxx +41 -0
  103. data/ext/couchbase/couchbase/management/eventing_function.hxx +188 -0
  104. data/ext/couchbase/couchbase/management/eventing_function_json.hxx +212 -0
  105. data/ext/couchbase/couchbase/management/eventing_status.hxx +84 -0
  106. data/ext/couchbase/couchbase/management/eventing_status_json.hxx +77 -0
  107. data/ext/couchbase/couchbase/management/query_index.hxx +39 -0
  108. data/ext/couchbase/couchbase/management/rbac.hxx +77 -0
  109. data/ext/couchbase/couchbase/management/rbac_fmt.hxx +49 -0
  110. data/ext/couchbase/couchbase/management/rbac_json.hxx +179 -0
  111. data/ext/couchbase/couchbase/management/search_index.hxx +38 -0
  112. data/ext/couchbase/couchbase/management/search_index_json.hxx +58 -0
  113. data/ext/couchbase/couchbase/meta/CMakeLists.txt +15 -0
  114. data/ext/couchbase/couchbase/meta/version.cxx +181 -0
  115. data/ext/couchbase/couchbase/meta/version.hxx +45 -0
  116. data/ext/couchbase/couchbase/metrics/CMakeLists.txt +11 -0
  117. data/ext/couchbase/couchbase/metrics/logging_meter.cxx +194 -0
  118. data/ext/couchbase/couchbase/metrics/logging_meter.hxx +74 -0
  119. data/ext/couchbase/couchbase/metrics/logging_meter_options.hxx +28 -0
  120. data/ext/couchbase/couchbase/metrics/meter.hxx +52 -0
  121. data/ext/couchbase/couchbase/metrics/noop_meter.hxx +47 -0
  122. data/ext/couchbase/couchbase/mutation_token.hxx +31 -0
  123. data/ext/couchbase/couchbase/mutation_token_fmt.hxx +37 -0
  124. data/ext/couchbase/couchbase/operations/CMakeLists.txt +35 -0
  125. data/ext/couchbase/couchbase/operations/document_analytics.cxx +195 -0
  126. data/ext/couchbase/couchbase/operations/document_analytics.hxx +92 -0
  127. data/ext/couchbase/couchbase/operations/document_append.cxx +46 -0
  128. data/ext/couchbase/couchbase/operations/document_append.hxx +63 -0
  129. data/ext/couchbase/couchbase/operations/document_decrement.cxx +57 -0
  130. data/ext/couchbase/couchbase/operations/document_decrement.hxx +67 -0
  131. data/ext/couchbase/couchbase/operations/document_exists.cxx +49 -0
  132. data/ext/couchbase/couchbase/operations/document_exists.hxx +61 -0
  133. data/ext/couchbase/couchbase/operations/document_get.cxx +44 -0
  134. data/ext/couchbase/couchbase/operations/document_get.hxx +53 -0
  135. data/ext/couchbase/couchbase/operations/document_get_and_lock.cxx +45 -0
  136. data/ext/couchbase/couchbase/operations/document_get_and_lock.hxx +54 -0
  137. data/ext/couchbase/couchbase/operations/document_get_and_touch.cxx +45 -0
  138. data/ext/couchbase/couchbase/operations/document_get_and_touch.hxx +54 -0
  139. data/ext/couchbase/couchbase/operations/document_get_projected.cxx +227 -0
  140. data/ext/couchbase/couchbase/operations/document_get_projected.hxx +58 -0
  141. data/ext/couchbase/couchbase/operations/document_increment.cxx +57 -0
  142. data/ext/couchbase/couchbase/operations/document_increment.hxx +67 -0
  143. data/ext/couchbase/couchbase/operations/document_insert.cxx +48 -0
  144. data/ext/couchbase/couchbase/operations/document_insert.hxx +65 -0
  145. data/ext/couchbase/couchbase/operations/document_lookup_in.cxx +81 -0
  146. data/ext/couchbase/couchbase/operations/document_lookup_in.hxx +64 -0
  147. data/ext/couchbase/couchbase/operations/document_mutate_in.cxx +104 -0
  148. data/ext/couchbase/couchbase/operations/document_mutate_in.hxx +82 -0
  149. data/ext/couchbase/couchbase/operations/document_prepend.cxx +46 -0
  150. data/ext/couchbase/couchbase/operations/document_prepend.hxx +63 -0
  151. data/ext/couchbase/couchbase/operations/document_query.cxx +370 -0
  152. data/ext/couchbase/couchbase/operations/document_query.hxx +123 -0
  153. data/ext/couchbase/couchbase/operations/document_remove.cxx +46 -0
  154. data/ext/couchbase/couchbase/operations/document_remove.hxx +63 -0
  155. data/ext/couchbase/couchbase/operations/document_replace.cxx +52 -0
  156. data/ext/couchbase/couchbase/operations/document_replace.hxx +67 -0
  157. data/ext/couchbase/couchbase/operations/document_search.cxx +311 -0
  158. data/ext/couchbase/couchbase/operations/document_search.hxx +153 -0
  159. data/ext/couchbase/couchbase/operations/document_touch.cxx +43 -0
  160. data/ext/couchbase/couchbase/operations/document_touch.hxx +52 -0
  161. data/ext/couchbase/couchbase/operations/document_unlock.cxx +43 -0
  162. data/ext/couchbase/couchbase/operations/document_unlock.hxx +52 -0
  163. data/ext/couchbase/couchbase/operations/document_upsert.cxx +52 -0
  164. data/ext/couchbase/couchbase/operations/document_upsert.hxx +66 -0
  165. data/ext/couchbase/couchbase/operations/document_view.cxx +183 -0
  166. data/ext/couchbase/couchbase/operations/document_view.hxx +97 -0
  167. data/ext/couchbase/couchbase/operations/http_noop.cxx +60 -0
  168. data/ext/couchbase/couchbase/operations/http_noop.hxx +48 -0
  169. data/ext/couchbase/couchbase/operations/management/CMakeLists.txt +79 -0
  170. data/ext/couchbase/couchbase/operations/management/analytics.hxx +34 -0
  171. data/ext/couchbase/couchbase/operations/management/analytics_dataset_create.cxx +94 -0
  172. data/ext/couchbase/couchbase/operations/management/analytics_dataset_create.hxx +57 -0
  173. data/ext/couchbase/couchbase/operations/management/analytics_dataset_drop.cxx +83 -0
  174. data/ext/couchbase/couchbase/operations/management/analytics_dataset_drop.hxx +54 -0
  175. data/ext/couchbase/couchbase/operations/management/analytics_dataset_get_all.cxx +80 -0
  176. data/ext/couchbase/couchbase/operations/management/analytics_dataset_get_all.hxx +52 -0
  177. data/ext/couchbase/couchbase/operations/management/analytics_dataverse_create.cxx +82 -0
  178. data/ext/couchbase/couchbase/operations/management/analytics_dataverse_create.hxx +53 -0
  179. data/ext/couchbase/couchbase/operations/management/analytics_dataverse_drop.cxx +82 -0
  180. data/ext/couchbase/couchbase/operations/management/analytics_dataverse_drop.hxx +53 -0
  181. data/ext/couchbase/couchbase/operations/management/analytics_get_pending_mutations.cxx +70 -0
  182. data/ext/couchbase/couchbase/operations/management/analytics_get_pending_mutations.hxx +52 -0
  183. data/ext/couchbase/couchbase/operations/management/analytics_index_create.cxx +106 -0
  184. data/ext/couchbase/couchbase/operations/management/analytics_index_create.hxx +56 -0
  185. data/ext/couchbase/couchbase/operations/management/analytics_index_drop.cxx +90 -0
  186. data/ext/couchbase/couchbase/operations/management/analytics_index_drop.hxx +55 -0
  187. data/ext/couchbase/couchbase/operations/management/analytics_index_get_all.cxx +80 -0
  188. data/ext/couchbase/couchbase/operations/management/analytics_index_get_all.hxx +52 -0
  189. data/ext/couchbase/couchbase/operations/management/analytics_link_connect.cxx +82 -0
  190. data/ext/couchbase/couchbase/operations/management/analytics_link_connect.hxx +57 -0
  191. data/ext/couchbase/couchbase/operations/management/analytics_link_create.cxx +87 -0
  192. data/ext/couchbase/couchbase/operations/management/analytics_link_create.hxx +77 -0
  193. data/ext/couchbase/couchbase/operations/management/analytics_link_disconnect.cxx +80 -0
  194. data/ext/couchbase/couchbase/operations/management/analytics_link_disconnect.hxx +56 -0
  195. data/ext/couchbase/couchbase/operations/management/analytics_link_drop.cxx +103 -0
  196. data/ext/couchbase/couchbase/operations/management/analytics_link_drop.hxx +56 -0
  197. data/ext/couchbase/couchbase/operations/management/analytics_link_get_all.cxx +130 -0
  198. data/ext/couchbase/couchbase/operations/management/analytics_link_get_all.hxx +63 -0
  199. data/ext/couchbase/couchbase/operations/management/analytics_link_replace.cxx +87 -0
  200. data/ext/couchbase/couchbase/operations/management/analytics_link_replace.hxx +78 -0
  201. data/ext/couchbase/couchbase/operations/management/analytics_link_utils.hxx +37 -0
  202. data/ext/couchbase/couchbase/operations/management/analytics_problem.hxx +30 -0
  203. data/ext/couchbase/couchbase/operations/management/bucket.hxx +25 -0
  204. data/ext/couchbase/couchbase/operations/management/bucket_create.cxx +171 -0
  205. data/ext/couchbase/couchbase/operations/management/bucket_create.hxx +52 -0
  206. data/ext/couchbase/couchbase/operations/management/bucket_describe.cxx +67 -0
  207. data/ext/couchbase/couchbase/operations/management/bucket_describe.hxx +61 -0
  208. data/ext/couchbase/couchbase/operations/management/bucket_drop.cxx +52 -0
  209. data/ext/couchbase/couchbase/operations/management/bucket_drop.hxx +49 -0
  210. data/ext/couchbase/couchbase/operations/management/bucket_flush.cxx +59 -0
  211. data/ext/couchbase/couchbase/operations/management/bucket_flush.hxx +49 -0
  212. data/ext/couchbase/couchbase/operations/management/bucket_get.cxx +59 -0
  213. data/ext/couchbase/couchbase/operations/management/bucket_get.hxx +51 -0
  214. data/ext/couchbase/couchbase/operations/management/bucket_get_all.cxx +59 -0
  215. data/ext/couchbase/couchbase/operations/management/bucket_get_all.hxx +49 -0
  216. data/ext/couchbase/couchbase/operations/management/bucket_update.cxx +130 -0
  217. data/ext/couchbase/couchbase/operations/management/bucket_update.hxx +52 -0
  218. data/ext/couchbase/couchbase/operations/management/cluster_describe.cxx +90 -0
  219. data/ext/couchbase/couchbase/operations/management/cluster_describe.hxx +72 -0
  220. data/ext/couchbase/couchbase/operations/management/cluster_developer_preview_enable.cxx +44 -0
  221. data/ext/couchbase/couchbase/operations/management/cluster_developer_preview_enable.hxx +48 -0
  222. data/ext/couchbase/couchbase/operations/management/collection_create.cxx +83 -0
  223. data/ext/couchbase/couchbase/operations/management/collection_create.hxx +53 -0
  224. data/ext/couchbase/couchbase/operations/management/collection_drop.cxx +73 -0
  225. data/ext/couchbase/couchbase/operations/management/collection_drop.hxx +52 -0
  226. data/ext/couchbase/couchbase/operations/management/collections.hxx +25 -0
  227. data/ext/couchbase/couchbase/operations/management/collections_manifest_get.cxx +40 -0
  228. data/ext/couchbase/couchbase/operations/management/collections_manifest_get.hxx +53 -0
  229. data/ext/couchbase/couchbase/operations/management/error_utils.cxx +265 -0
  230. data/ext/couchbase/couchbase/operations/management/error_utils.hxx +48 -0
  231. data/ext/couchbase/couchbase/operations/management/eventing.hxx +28 -0
  232. data/ext/couchbase/couchbase/operations/management/eventing_deploy_function.cxx +56 -0
  233. data/ext/couchbase/couchbase/operations/management/eventing_deploy_function.hxx +52 -0
  234. data/ext/couchbase/couchbase/operations/management/eventing_drop_function.cxx +57 -0
  235. data/ext/couchbase/couchbase/operations/management/eventing_drop_function.hxx +52 -0
  236. data/ext/couchbase/couchbase/operations/management/eventing_get_all_functions.cxx +64 -0
  237. data/ext/couchbase/couchbase/operations/management/eventing_get_all_functions.hxx +51 -0
  238. data/ext/couchbase/couchbase/operations/management/eventing_get_function.cxx +56 -0
  239. data/ext/couchbase/couchbase/operations/management/eventing_get_function.hxx +53 -0
  240. data/ext/couchbase/couchbase/operations/management/eventing_get_status.cxx +56 -0
  241. data/ext/couchbase/couchbase/operations/management/eventing_get_status.hxx +53 -0
  242. data/ext/couchbase/couchbase/operations/management/eventing_pause_function.cxx +56 -0
  243. data/ext/couchbase/couchbase/operations/management/eventing_pause_function.hxx +52 -0
  244. data/ext/couchbase/couchbase/operations/management/eventing_problem.hxx +31 -0
  245. data/ext/couchbase/couchbase/operations/management/eventing_resume_function.cxx +56 -0
  246. data/ext/couchbase/couchbase/operations/management/eventing_resume_function.hxx +52 -0
  247. data/ext/couchbase/couchbase/operations/management/eventing_undeploy_function.cxx +56 -0
  248. data/ext/couchbase/couchbase/operations/management/eventing_undeploy_function.hxx +52 -0
  249. data/ext/couchbase/couchbase/operations/management/eventing_upsert_function.cxx +341 -0
  250. data/ext/couchbase/couchbase/operations/management/eventing_upsert_function.hxx +52 -0
  251. data/ext/couchbase/couchbase/operations/management/freeform.cxx +55 -0
  252. data/ext/couchbase/couchbase/operations/management/freeform.hxx +55 -0
  253. data/ext/couchbase/couchbase/operations/management/group_drop.cxx +51 -0
  254. data/ext/couchbase/couchbase/operations/management/group_drop.hxx +49 -0
  255. data/ext/couchbase/couchbase/operations/management/group_get.cxx +60 -0
  256. data/ext/couchbase/couchbase/operations/management/group_get.hxx +50 -0
  257. data/ext/couchbase/couchbase/operations/management/group_get_all.cxx +58 -0
  258. data/ext/couchbase/couchbase/operations/management/group_get_all.hxx +49 -0
  259. data/ext/couchbase/couchbase/operations/management/group_upsert.cxx +96 -0
  260. data/ext/couchbase/couchbase/operations/management/group_upsert.hxx +51 -0
  261. data/ext/couchbase/couchbase/operations/management/query.hxx +23 -0
  262. data/ext/couchbase/couchbase/operations/management/query_index_build_deferred.cxx +88 -0
  263. data/ext/couchbase/couchbase/operations/management/query_index_build_deferred.hxx +61 -0
  264. data/ext/couchbase/couchbase/operations/management/query_index_create.cxx +149 -0
  265. data/ext/couchbase/couchbase/operations/management/query_index_create.hxx +65 -0
  266. data/ext/couchbase/couchbase/operations/management/query_index_drop.cxx +128 -0
  267. data/ext/couchbase/couchbase/operations/management/query_index_drop.hxx +61 -0
  268. data/ext/couchbase/couchbase/operations/management/query_index_get_all.cxx +126 -0
  269. data/ext/couchbase/couchbase/operations/management/query_index_get_all.hxx +54 -0
  270. data/ext/couchbase/couchbase/operations/management/role_get_all.cxx +58 -0
  271. data/ext/couchbase/couchbase/operations/management/role_get_all.hxx +49 -0
  272. data/ext/couchbase/couchbase/operations/management/scope_create.cxx +75 -0
  273. data/ext/couchbase/couchbase/operations/management/scope_create.hxx +51 -0
  274. data/ext/couchbase/couchbase/operations/management/scope_drop.cxx +70 -0
  275. data/ext/couchbase/couchbase/operations/management/scope_drop.hxx +51 -0
  276. data/ext/couchbase/couchbase/operations/management/scope_get_all.cxx +62 -0
  277. data/ext/couchbase/couchbase/operations/management/scope_get_all.hxx +51 -0
  278. data/ext/couchbase/couchbase/operations/management/search.hxx +30 -0
  279. data/ext/couchbase/couchbase/operations/management/search_get_stats.cxx +41 -0
  280. data/ext/couchbase/couchbase/operations/management/search_get_stats.hxx +48 -0
  281. data/ext/couchbase/couchbase/operations/management/search_index_analyze_document.cxx +85 -0
  282. data/ext/couchbase/couchbase/operations/management/search_index_analyze_document.hxx +54 -0
  283. data/ext/couchbase/couchbase/operations/management/search_index_control_ingest.cxx +73 -0
  284. data/ext/couchbase/couchbase/operations/management/search_index_control_ingest.hxx +52 -0
  285. data/ext/couchbase/couchbase/operations/management/search_index_control_plan_freeze.cxx +73 -0
  286. data/ext/couchbase/couchbase/operations/management/search_index_control_plan_freeze.hxx +57 -0
  287. data/ext/couchbase/couchbase/operations/management/search_index_control_query.cxx +73 -0
  288. data/ext/couchbase/couchbase/operations/management/search_index_control_query.hxx +52 -0
  289. data/ext/couchbase/couchbase/operations/management/search_index_drop.cxx +72 -0
  290. data/ext/couchbase/couchbase/operations/management/search_index_drop.hxx +51 -0
  291. data/ext/couchbase/couchbase/operations/management/search_index_get.cxx +75 -0
  292. data/ext/couchbase/couchbase/operations/management/search_index_get.hxx +54 -0
  293. data/ext/couchbase/couchbase/operations/management/search_index_get_all.cxx +67 -0
  294. data/ext/couchbase/couchbase/operations/management/search_index_get_all.hxx +51 -0
  295. data/ext/couchbase/couchbase/operations/management/search_index_get_documents_count.cxx +79 -0
  296. data/ext/couchbase/couchbase/operations/management/search_index_get_documents_count.hxx +53 -0
  297. data/ext/couchbase/couchbase/operations/management/search_index_get_stats.cxx +71 -0
  298. data/ext/couchbase/couchbase/operations/management/search_index_get_stats.hxx +52 -0
  299. data/ext/couchbase/couchbase/operations/management/search_index_upsert.cxx +108 -0
  300. data/ext/couchbase/couchbase/operations/management/search_index_upsert.hxx +52 -0
  301. data/ext/couchbase/couchbase/operations/management/user.hxx +28 -0
  302. data/ext/couchbase/couchbase/operations/management/user_drop.cxx +52 -0
  303. data/ext/couchbase/couchbase/operations/management/user_drop.hxx +51 -0
  304. data/ext/couchbase/couchbase/operations/management/user_get.cxx +61 -0
  305. data/ext/couchbase/couchbase/operations/management/user_get.hxx +52 -0
  306. data/ext/couchbase/couchbase/operations/management/user_get_all.cxx +59 -0
  307. data/ext/couchbase/couchbase/operations/management/user_get_all.hxx +51 -0
  308. data/ext/couchbase/couchbase/operations/management/user_upsert.cxx +101 -0
  309. data/ext/couchbase/couchbase/operations/management/user_upsert.hxx +52 -0
  310. data/ext/couchbase/couchbase/operations/management/view.hxx +23 -0
  311. data/ext/couchbase/couchbase/operations/management/view_index_drop.cxx +46 -0
  312. data/ext/couchbase/couchbase/operations/management/view_index_drop.hxx +52 -0
  313. data/ext/couchbase/couchbase/operations/management/view_index_get.cxx +74 -0
  314. data/ext/couchbase/couchbase/operations/management/view_index_get.hxx +53 -0
  315. data/ext/couchbase/couchbase/operations/management/view_index_get_all.cxx +108 -0
  316. data/ext/couchbase/couchbase/operations/management/view_index_get_all.hxx +52 -0
  317. data/ext/couchbase/couchbase/operations/management/view_index_upsert.cxx +71 -0
  318. data/ext/couchbase/couchbase/operations/management/view_index_upsert.hxx +51 -0
  319. data/ext/couchbase/couchbase/operations/mcbp_noop.cxx +38 -0
  320. data/ext/couchbase/couchbase/operations/mcbp_noop.hxx +49 -0
  321. data/ext/couchbase/couchbase/operations.hxx +42 -0
  322. data/ext/couchbase/couchbase/origin.hxx +185 -0
  323. data/ext/couchbase/couchbase/platform/CMakeLists.txt +16 -0
  324. data/ext/couchbase/couchbase/platform/backtrace.c +189 -0
  325. data/ext/couchbase/couchbase/platform/backtrace.h +54 -0
  326. data/ext/couchbase/couchbase/platform/base64.cc +234 -0
  327. data/ext/couchbase/couchbase/platform/base64.h +44 -0
  328. data/ext/couchbase/couchbase/platform/dirutils.cc +123 -0
  329. data/ext/couchbase/couchbase/platform/dirutils.h +43 -0
  330. data/ext/couchbase/couchbase/platform/random.cc +120 -0
  331. data/ext/couchbase/couchbase/platform/random.h +39 -0
  332. data/ext/couchbase/couchbase/platform/string_hex.cc +99 -0
  333. data/ext/couchbase/couchbase/platform/string_hex.h +50 -0
  334. data/ext/couchbase/couchbase/platform/terminate_handler.cc +125 -0
  335. data/ext/couchbase/couchbase/platform/terminate_handler.h +36 -0
  336. data/ext/couchbase/couchbase/platform/uuid.cc +98 -0
  337. data/ext/couchbase/couchbase/platform/uuid.h +56 -0
  338. data/ext/couchbase/couchbase/protocol/CMakeLists.txt +42 -0
  339. data/ext/couchbase/couchbase/protocol/client_opcode.hxx +359 -0
  340. data/ext/couchbase/couchbase/protocol/client_opcode_fmt.hxx +316 -0
  341. data/ext/couchbase/couchbase/protocol/client_request.cxx +37 -0
  342. data/ext/couchbase/couchbase/protocol/client_request.hxx +157 -0
  343. data/ext/couchbase/couchbase/protocol/client_response.cxx +74 -0
  344. data/ext/couchbase/couchbase/protocol/client_response.hxx +211 -0
  345. data/ext/couchbase/couchbase/protocol/cmd_append.cxx +82 -0
  346. data/ext/couchbase/couchbase/protocol/cmd_append.hxx +107 -0
  347. data/ext/couchbase/couchbase/protocol/cmd_cluster_map_change_notification.cxx +51 -0
  348. data/ext/couchbase/couchbase/protocol/cmd_cluster_map_change_notification.hxx +57 -0
  349. data/ext/couchbase/couchbase/protocol/cmd_decrement.cxx +112 -0
  350. data/ext/couchbase/couchbase/protocol/cmd_decrement.hxx +131 -0
  351. data/ext/couchbase/couchbase/protocol/cmd_exists.cxx +92 -0
  352. data/ext/couchbase/couchbase/protocol/cmd_exists.hxx +121 -0
  353. data/ext/couchbase/couchbase/protocol/cmd_get.cxx +63 -0
  354. data/ext/couchbase/couchbase/protocol/cmd_get.hxx +101 -0
  355. data/ext/couchbase/couchbase/protocol/cmd_get_and_lock.cxx +68 -0
  356. data/ext/couchbase/couchbase/protocol/cmd_get_and_lock.hxx +117 -0
  357. data/ext/couchbase/couchbase/protocol/cmd_get_and_touch.cxx +70 -0
  358. data/ext/couchbase/couchbase/protocol/cmd_get_and_touch.hxx +117 -0
  359. data/ext/couchbase/couchbase/protocol/cmd_get_cluster_config.cxx +84 -0
  360. data/ext/couchbase/couchbase/protocol/cmd_get_cluster_config.hxx +89 -0
  361. data/ext/couchbase/couchbase/protocol/cmd_get_collection_id.cxx +50 -0
  362. data/ext/couchbase/couchbase/protocol/cmd_get_collection_id.hxx +98 -0
  363. data/ext/couchbase/couchbase/protocol/cmd_get_collections_manifest.cxx +44 -0
  364. data/ext/couchbase/couchbase/protocol/cmd_get_collections_manifest.hxx +84 -0
  365. data/ext/couchbase/couchbase/protocol/cmd_get_error_map.cxx +59 -0
  366. data/ext/couchbase/couchbase/protocol/cmd_get_error_map.hxx +103 -0
  367. data/ext/couchbase/couchbase/protocol/cmd_get_meta.cxx +74 -0
  368. data/ext/couchbase/couchbase/protocol/cmd_get_meta.hxx +119 -0
  369. data/ext/couchbase/couchbase/protocol/cmd_hello.cxx +66 -0
  370. data/ext/couchbase/couchbase/protocol/cmd_hello.hxx +144 -0
  371. data/ext/couchbase/couchbase/protocol/cmd_increment.cxx +117 -0
  372. data/ext/couchbase/couchbase/protocol/cmd_increment.hxx +131 -0
  373. data/ext/couchbase/couchbase/protocol/cmd_info.hxx +29 -0
  374. data/ext/couchbase/couchbase/protocol/cmd_insert.cxx +92 -0
  375. data/ext/couchbase/couchbase/protocol/cmd_insert.hxx +123 -0
  376. data/ext/couchbase/couchbase/protocol/cmd_lookup_in.cxx +109 -0
  377. data/ext/couchbase/couchbase/protocol/cmd_lookup_in.hxx +165 -0
  378. data/ext/couchbase/couchbase/protocol/cmd_mutate_in.cxx +174 -0
  379. data/ext/couchbase/couchbase/protocol/cmd_mutate_in.hxx +311 -0
  380. data/ext/couchbase/couchbase/protocol/cmd_noop.cxx +36 -0
  381. data/ext/couchbase/couchbase/protocol/cmd_noop.hxx +75 -0
  382. data/ext/couchbase/couchbase/protocol/cmd_prepend.cxx +82 -0
  383. data/ext/couchbase/couchbase/protocol/cmd_prepend.hxx +102 -0
  384. data/ext/couchbase/couchbase/protocol/cmd_remove.cxx +83 -0
  385. data/ext/couchbase/couchbase/protocol/cmd_remove.hxx +93 -0
  386. data/ext/couchbase/couchbase/protocol/cmd_replace.cxx +105 -0
  387. data/ext/couchbase/couchbase/protocol/cmd_replace.hxx +130 -0
  388. data/ext/couchbase/couchbase/protocol/cmd_sasl_auth.cxx +40 -0
  389. data/ext/couchbase/couchbase/protocol/cmd_sasl_auth.hxx +97 -0
  390. data/ext/couchbase/couchbase/protocol/cmd_sasl_list_mechs.cxx +48 -0
  391. data/ext/couchbase/couchbase/protocol/cmd_sasl_list_mechs.hxx +82 -0
  392. data/ext/couchbase/couchbase/protocol/cmd_sasl_step.cxx +40 -0
  393. data/ext/couchbase/couchbase/protocol/cmd_sasl_step.hxx +97 -0
  394. data/ext/couchbase/couchbase/protocol/cmd_select_bucket.cxx +36 -0
  395. data/ext/couchbase/couchbase/protocol/cmd_select_bucket.hxx +82 -0
  396. data/ext/couchbase/couchbase/protocol/cmd_touch.cxx +57 -0
  397. data/ext/couchbase/couchbase/protocol/cmd_touch.hxx +84 -0
  398. data/ext/couchbase/couchbase/protocol/cmd_unlock.cxx +48 -0
  399. data/ext/couchbase/couchbase/protocol/cmd_unlock.hxx +81 -0
  400. data/ext/couchbase/couchbase/protocol/cmd_upsert.cxx +104 -0
  401. data/ext/couchbase/couchbase/protocol/cmd_upsert.hxx +125 -0
  402. data/ext/couchbase/couchbase/protocol/datatype.hxx +48 -0
  403. data/ext/couchbase/couchbase/protocol/durability_level.hxx +59 -0
  404. data/ext/couchbase/couchbase/protocol/durability_level_fmt.hxx +52 -0
  405. data/ext/couchbase/couchbase/protocol/enhanced_error_info.hxx +28 -0
  406. data/ext/couchbase/couchbase/protocol/enhanced_error_info_fmt.hxx +44 -0
  407. data/ext/couchbase/couchbase/protocol/frame_info_id.hxx +142 -0
  408. data/ext/couchbase/couchbase/protocol/frame_info_id_fmt.hxx +79 -0
  409. data/ext/couchbase/couchbase/protocol/hello_feature.hxx +186 -0
  410. data/ext/couchbase/couchbase/protocol/hello_feature_fmt.hxx +106 -0
  411. data/ext/couchbase/couchbase/protocol/magic.hxx +53 -0
  412. data/ext/couchbase/couchbase/protocol/magic_fmt.hxx +58 -0
  413. data/ext/couchbase/couchbase/protocol/server_opcode.hxx +39 -0
  414. data/ext/couchbase/couchbase/protocol/server_opcode_fmt.hxx +46 -0
  415. data/ext/couchbase/couchbase/protocol/server_request.hxx +121 -0
  416. data/ext/couchbase/couchbase/protocol/status.cxx +187 -0
  417. data/ext/couchbase/couchbase/protocol/status.hxx +180 -0
  418. data/ext/couchbase/couchbase/protocol/status_fmt.hxx +241 -0
  419. data/ext/couchbase/couchbase/query_profile_mode.hxx +27 -0
  420. data/ext/couchbase/couchbase/query_scan_consistency.hxx +23 -0
  421. data/ext/couchbase/couchbase/sasl/CMakeLists.txt +16 -0
  422. data/ext/couchbase/couchbase/sasl/client.cc +50 -0
  423. data/ext/couchbase/couchbase/sasl/client.h +128 -0
  424. data/ext/couchbase/couchbase/sasl/context.cc +34 -0
  425. data/ext/couchbase/couchbase/sasl/context.h +52 -0
  426. data/ext/couchbase/couchbase/sasl/error.h +28 -0
  427. data/ext/couchbase/couchbase/sasl/error_fmt.h +70 -0
  428. data/ext/couchbase/couchbase/sasl/mechanism.cc +45 -0
  429. data/ext/couchbase/couchbase/sasl/mechanism.h +52 -0
  430. data/ext/couchbase/couchbase/sasl/plain/plain.cc +39 -0
  431. data/ext/couchbase/couchbase/sasl/plain/plain.h +54 -0
  432. data/ext/couchbase/couchbase/sasl/scram-sha/scram-sha.cc +372 -0
  433. data/ext/couchbase/couchbase/sasl/scram-sha/scram-sha.h +184 -0
  434. data/ext/couchbase/couchbase/sasl/scram-sha/stringutils.cc +82 -0
  435. data/ext/couchbase/couchbase/sasl/scram-sha/stringutils.h +48 -0
  436. data/ext/couchbase/couchbase/search_highlight_style.hxx +23 -0
  437. data/ext/couchbase/couchbase/search_scan_consistency.hxx +23 -0
  438. data/ext/couchbase/couchbase/service_type.hxx +31 -0
  439. data/ext/couchbase/couchbase/service_type_fmt.hxx +61 -0
  440. data/ext/couchbase/couchbase/timeout_defaults.hxx +42 -0
  441. data/ext/couchbase/couchbase/topology/CMakeLists.txt +9 -0
  442. data/ext/couchbase/couchbase/topology/capabilities.hxx +43 -0
  443. data/ext/couchbase/couchbase/topology/capabilities_fmt.hxx +106 -0
  444. data/ext/couchbase/couchbase/topology/collections_manifest.hxx +42 -0
  445. data/ext/couchbase/couchbase/topology/collections_manifest_fmt.hxx +52 -0
  446. data/ext/couchbase/couchbase/topology/collections_manifest_json.hxx +50 -0
  447. data/ext/couchbase/couchbase/topology/configuration.cxx +223 -0
  448. data/ext/couchbase/couchbase/topology/configuration.hxx +120 -0
  449. data/ext/couchbase/couchbase/topology/configuration_fmt.hxx +166 -0
  450. data/ext/couchbase/couchbase/topology/configuration_json.hxx +259 -0
  451. data/ext/couchbase/couchbase/topology/error_map.hxx +149 -0
  452. data/ext/couchbase/couchbase/topology/error_map_fmt.hxx +94 -0
  453. data/ext/couchbase/couchbase/topology/error_map_json.hxx +88 -0
  454. data/ext/couchbase/couchbase/tracing/CMakeLists.txt +9 -0
  455. data/ext/couchbase/couchbase/tracing/constants.hxx +274 -0
  456. data/ext/couchbase/couchbase/tracing/noop_tracer.hxx +55 -0
  457. data/ext/couchbase/couchbase/tracing/request_tracer.hxx +79 -0
  458. data/ext/couchbase/couchbase/tracing/threshold_logging_options.hxx +68 -0
  459. data/ext/couchbase/couchbase/tracing/threshold_logging_tracer.cxx +422 -0
  460. data/ext/couchbase/couchbase/tracing/threshold_logging_tracer.hxx +49 -0
  461. data/ext/couchbase/couchbase/utils/CMakeLists.txt +17 -0
  462. data/ext/couchbase/couchbase/utils/byteswap.cxx +45 -0
  463. data/ext/couchbase/couchbase/utils/byteswap.hxx +49 -0
  464. data/ext/couchbase/couchbase/utils/connection_string.cxx +420 -0
  465. data/ext/couchbase/couchbase/utils/connection_string.hxx +76 -0
  466. data/ext/couchbase/couchbase/utils/crc32.hxx +48 -0
  467. data/ext/couchbase/couchbase/utils/duration_parser.cxx +193 -0
  468. data/ext/couchbase/couchbase/utils/duration_parser.hxx +45 -0
  469. data/ext/couchbase/couchbase/utils/join_strings.hxx +65 -0
  470. data/ext/couchbase/couchbase/utils/json.cxx +71 -0
  471. data/ext/couchbase/couchbase/utils/json.hxx +37 -0
  472. data/ext/couchbase/couchbase/utils/json_stream_control.hxx +32 -0
  473. data/ext/couchbase/couchbase/utils/json_streaming_lexer.cxx +394 -0
  474. data/ext/couchbase/couchbase/utils/json_streaming_lexer.hxx +58 -0
  475. data/ext/couchbase/couchbase/utils/movable_function.hxx +110 -0
  476. data/ext/couchbase/couchbase/utils/name_codec.hxx +41 -0
  477. data/ext/couchbase/couchbase/utils/unsigned_leb128.hxx +181 -0
  478. data/ext/couchbase/couchbase/utils/url_codec.cxx +404 -0
  479. data/ext/couchbase/couchbase/utils/url_codec.hxx +72 -0
  480. data/ext/couchbase/couchbase/view_scan_consistency.hxx +27 -0
  481. data/ext/couchbase/couchbase/view_sort_order.hxx +23 -0
  482. data/ext/couchbase/test/CMakeLists.txt +22 -0
  483. data/ext/couchbase/test/benchmark_helper_integration.hxx +22 -0
  484. data/ext/couchbase/test/benchmark_integration_get.cxx +45 -0
  485. data/ext/couchbase/test/test_helper.hxx +25 -0
  486. data/ext/couchbase/test/test_helper_integration.hxx +24 -0
  487. data/ext/couchbase/test/test_integration_arithmetic.cxx +112 -0
  488. data/ext/couchbase/test/test_integration_binary_operations.cxx +115 -0
  489. data/ext/couchbase/test/test_integration_collections.cxx +176 -0
  490. data/ext/couchbase/test/test_integration_connect.cxx +148 -0
  491. data/ext/couchbase/test/test_integration_crud.cxx +726 -0
  492. data/ext/couchbase/test/test_integration_diagnostics.cxx +365 -0
  493. data/ext/couchbase/test/test_integration_durability.cxx +82 -0
  494. data/ext/couchbase/test/test_integration_management.cxx +2657 -0
  495. data/ext/couchbase/test/test_integration_query.cxx +407 -0
  496. data/ext/couchbase/test/test_integration_subdoc.cxx +893 -0
  497. data/ext/couchbase/test/test_unit_connection_string.cxx +379 -0
  498. data/ext/couchbase/test/test_unit_json_streaming_lexer.cxx +115 -0
  499. data/ext/couchbase/test/test_unit_jsonsl.cxx +511 -0
  500. data/ext/couchbase/test/test_unit_utils.cxx +127 -0
  501. data/ext/couchbase/third_party/asio/asio/include/asio/any_io_executor.hpp +301 -0
  502. data/ext/couchbase/third_party/asio/asio/include/asio/associated_allocator.hpp +177 -0
  503. data/ext/couchbase/third_party/asio/asio/include/asio/associated_cancellation_slot.hpp +177 -0
  504. data/ext/couchbase/third_party/asio/asio/include/asio/associated_executor.hpp +222 -0
  505. data/ext/couchbase/third_party/asio/asio/include/asio/associator.hpp +35 -0
  506. data/ext/couchbase/third_party/asio/asio/include/asio/async_result.hpp +1271 -0
  507. data/ext/couchbase/third_party/asio/asio/include/asio/awaitable.hpp +133 -0
  508. data/ext/couchbase/third_party/asio/asio/include/asio/basic_datagram_socket.hpp +1303 -0
  509. data/ext/couchbase/third_party/asio/asio/include/asio/basic_deadline_timer.hpp +703 -0
  510. data/ext/couchbase/third_party/asio/asio/include/asio/basic_file.hpp +829 -0
  511. data/ext/couchbase/third_party/asio/asio/include/asio/basic_io_object.hpp +290 -0
  512. data/ext/couchbase/third_party/asio/asio/include/asio/basic_random_access_file.hpp +677 -0
  513. data/ext/couchbase/third_party/asio/asio/include/asio/basic_raw_socket.hpp +1294 -0
  514. data/ext/couchbase/third_party/asio/asio/include/asio/basic_readable_pipe.hpp +523 -0
  515. data/ext/couchbase/third_party/asio/asio/include/asio/basic_seq_packet_socket.hpp +798 -0
  516. data/ext/couchbase/third_party/asio/asio/include/asio/basic_serial_port.hpp +907 -0
  517. data/ext/couchbase/third_party/asio/asio/include/asio/basic_signal_set.hpp +576 -0
  518. data/ext/couchbase/third_party/asio/asio/include/asio/basic_socket.hpp +1923 -0
  519. data/ext/couchbase/third_party/asio/asio/include/asio/basic_socket_acceptor.hpp +2606 -0
  520. data/ext/couchbase/third_party/asio/asio/include/asio/basic_socket_iostream.hpp +407 -0
  521. data/ext/couchbase/third_party/asio/asio/include/asio/basic_socket_streambuf.hpp +687 -0
  522. data/ext/couchbase/third_party/asio/asio/include/asio/basic_stream_file.hpp +730 -0
  523. data/ext/couchbase/third_party/asio/asio/include/asio/basic_stream_socket.hpp +1120 -0
  524. data/ext/couchbase/third_party/asio/asio/include/asio/basic_streambuf.hpp +452 -0
  525. data/ext/couchbase/third_party/asio/asio/include/asio/basic_streambuf_fwd.hpp +36 -0
  526. data/ext/couchbase/third_party/asio/asio/include/asio/basic_waitable_timer.hpp +821 -0
  527. data/ext/couchbase/third_party/asio/asio/include/asio/basic_writable_pipe.hpp +519 -0
  528. data/ext/couchbase/third_party/asio/asio/include/asio/bind_cancellation_slot.hpp +721 -0
  529. data/ext/couchbase/third_party/asio/asio/include/asio/bind_executor.hpp +754 -0
  530. data/ext/couchbase/third_party/asio/asio/include/asio/buffer.hpp +2496 -0
  531. data/ext/couchbase/third_party/asio/asio/include/asio/buffer_registration.hpp +327 -0
  532. data/ext/couchbase/third_party/asio/asio/include/asio/buffered_read_stream.hpp +253 -0
  533. data/ext/couchbase/third_party/asio/asio/include/asio/buffered_read_stream_fwd.hpp +25 -0
  534. data/ext/couchbase/third_party/asio/asio/include/asio/buffered_stream.hpp +279 -0
  535. data/ext/couchbase/third_party/asio/asio/include/asio/buffered_stream_fwd.hpp +25 -0
  536. data/ext/couchbase/third_party/asio/asio/include/asio/buffered_write_stream.hpp +245 -0
  537. data/ext/couchbase/third_party/asio/asio/include/asio/buffered_write_stream_fwd.hpp +25 -0
  538. data/ext/couchbase/third_party/asio/asio/include/asio/buffers_iterator.hpp +521 -0
  539. data/ext/couchbase/third_party/asio/asio/include/asio/cancellation_signal.hpp +305 -0
  540. data/ext/couchbase/third_party/asio/asio/include/asio/cancellation_state.hpp +235 -0
  541. data/ext/couchbase/third_party/asio/asio/include/asio/cancellation_type.hpp +174 -0
  542. data/ext/couchbase/third_party/asio/asio/include/asio/co_spawn.hpp +499 -0
  543. data/ext/couchbase/third_party/asio/asio/include/asio/completion_condition.hpp +218 -0
  544. data/ext/couchbase/third_party/asio/asio/include/asio/compose.hpp +136 -0
  545. data/ext/couchbase/third_party/asio/asio/include/asio/connect.hpp +1136 -0
  546. data/ext/couchbase/third_party/asio/asio/include/asio/connect_pipe.hpp +83 -0
  547. data/ext/couchbase/third_party/asio/asio/include/asio/coroutine.hpp +328 -0
  548. data/ext/couchbase/third_party/asio/asio/include/asio/deadline_timer.hpp +38 -0
  549. data/ext/couchbase/third_party/asio/asio/include/asio/defer.hpp +130 -0
  550. data/ext/couchbase/third_party/asio/asio/include/asio/detached.hpp +112 -0
  551. data/ext/couchbase/third_party/asio/asio/include/asio/detail/array.hpp +38 -0
  552. data/ext/couchbase/third_party/asio/asio/include/asio/detail/array_fwd.hpp +34 -0
  553. data/ext/couchbase/third_party/asio/asio/include/asio/detail/assert.hpp +32 -0
  554. data/ext/couchbase/third_party/asio/asio/include/asio/detail/atomic_count.hpp +67 -0
  555. data/ext/couchbase/third_party/asio/asio/include/asio/detail/base_from_cancellation_state.hpp +163 -0
  556. data/ext/couchbase/third_party/asio/asio/include/asio/detail/base_from_completion_cond.hpp +69 -0
  557. data/ext/couchbase/third_party/asio/asio/include/asio/detail/bind_handler.hpp +1071 -0
  558. data/ext/couchbase/third_party/asio/asio/include/asio/detail/blocking_executor_op.hpp +107 -0
  559. data/ext/couchbase/third_party/asio/asio/include/asio/detail/buffer_resize_guard.hpp +66 -0
  560. data/ext/couchbase/third_party/asio/asio/include/asio/detail/buffer_sequence_adapter.hpp +841 -0
  561. data/ext/couchbase/third_party/asio/asio/include/asio/detail/buffered_stream_storage.hpp +126 -0
  562. data/ext/couchbase/third_party/asio/asio/include/asio/detail/bulk_executor_op.hpp +88 -0
  563. data/ext/couchbase/third_party/asio/asio/include/asio/detail/call_stack.hpp +125 -0
  564. data/ext/couchbase/third_party/asio/asio/include/asio/detail/chrono.hpp +66 -0
  565. data/ext/couchbase/third_party/asio/asio/include/asio/detail/chrono_time_traits.hpp +190 -0
  566. data/ext/couchbase/third_party/asio/asio/include/asio/detail/completion_handler.hpp +88 -0
  567. data/ext/couchbase/third_party/asio/asio/include/asio/detail/concurrency_hint.hpp +94 -0
  568. data/ext/couchbase/third_party/asio/asio/include/asio/detail/conditionally_enabled_event.hpp +120 -0
  569. data/ext/couchbase/third_party/asio/asio/include/asio/detail/conditionally_enabled_mutex.hpp +149 -0
  570. data/ext/couchbase/third_party/asio/asio/include/asio/detail/config.hpp +1998 -0
  571. data/ext/couchbase/third_party/asio/asio/include/asio/detail/consuming_buffers.hpp +451 -0
  572. data/ext/couchbase/third_party/asio/asio/include/asio/detail/cstddef.hpp +31 -0
  573. data/ext/couchbase/third_party/asio/asio/include/asio/detail/cstdint.hpp +62 -0
  574. data/ext/couchbase/third_party/asio/asio/include/asio/detail/date_time_fwd.hpp +34 -0
  575. data/ext/couchbase/third_party/asio/asio/include/asio/detail/deadline_timer_service.hpp +335 -0
  576. data/ext/couchbase/third_party/asio/asio/include/asio/detail/dependent_type.hpp +36 -0
  577. data/ext/couchbase/third_party/asio/asio/include/asio/detail/descriptor_ops.hpp +179 -0
  578. data/ext/couchbase/third_party/asio/asio/include/asio/detail/descriptor_read_op.hpp +148 -0
  579. data/ext/couchbase/third_party/asio/asio/include/asio/detail/descriptor_write_op.hpp +148 -0
  580. data/ext/couchbase/third_party/asio/asio/include/asio/detail/dev_poll_reactor.hpp +230 -0
  581. data/ext/couchbase/third_party/asio/asio/include/asio/detail/epoll_reactor.hpp +278 -0
  582. data/ext/couchbase/third_party/asio/asio/include/asio/detail/event.hpp +48 -0
  583. data/ext/couchbase/third_party/asio/asio/include/asio/detail/eventfd_select_interrupter.hpp +83 -0
  584. data/ext/couchbase/third_party/asio/asio/include/asio/detail/executor_function.hpp +204 -0
  585. data/ext/couchbase/third_party/asio/asio/include/asio/detail/executor_op.hpp +84 -0
  586. data/ext/couchbase/third_party/asio/asio/include/asio/detail/fd_set_adapter.hpp +39 -0
  587. data/ext/couchbase/third_party/asio/asio/include/asio/detail/fenced_block.hpp +80 -0
  588. data/ext/couchbase/third_party/asio/asio/include/asio/detail/functional.hpp +44 -0
  589. data/ext/couchbase/third_party/asio/asio/include/asio/detail/future.hpp +33 -0
  590. data/ext/couchbase/third_party/asio/asio/include/asio/detail/gcc_arm_fenced_block.hpp +91 -0
  591. data/ext/couchbase/third_party/asio/asio/include/asio/detail/gcc_hppa_fenced_block.hpp +68 -0
  592. data/ext/couchbase/third_party/asio/asio/include/asio/detail/gcc_sync_fenced_block.hpp +65 -0
  593. data/ext/couchbase/third_party/asio/asio/include/asio/detail/gcc_x86_fenced_block.hpp +99 -0
  594. data/ext/couchbase/third_party/asio/asio/include/asio/detail/global.hpp +52 -0
  595. data/ext/couchbase/third_party/asio/asio/include/asio/detail/handler_alloc_helpers.hpp +288 -0
  596. data/ext/couchbase/third_party/asio/asio/include/asio/detail/handler_cont_helpers.hpp +45 -0
  597. data/ext/couchbase/third_party/asio/asio/include/asio/detail/handler_invoke_helpers.hpp +80 -0
  598. data/ext/couchbase/third_party/asio/asio/include/asio/detail/handler_tracking.hpp +264 -0
  599. data/ext/couchbase/third_party/asio/asio/include/asio/detail/handler_type_requirements.hpp +559 -0
  600. data/ext/couchbase/third_party/asio/asio/include/asio/detail/handler_work.hpp +525 -0
  601. data/ext/couchbase/third_party/asio/asio/include/asio/detail/hash_map.hpp +331 -0
  602. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/buffer_sequence_adapter.ipp +118 -0
  603. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/descriptor_ops.ipp +933 -0
  604. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/dev_poll_reactor.hpp +111 -0
  605. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/dev_poll_reactor.ipp +460 -0
  606. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/epoll_reactor.hpp +109 -0
  607. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/epoll_reactor.ipp +817 -0
  608. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/eventfd_select_interrupter.ipp +171 -0
  609. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/handler_tracking.ipp +396 -0
  610. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/io_uring_descriptor_service.ipp +202 -0
  611. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/io_uring_file_service.ipp +131 -0
  612. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/io_uring_service.hpp +112 -0
  613. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/io_uring_service.ipp +879 -0
  614. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/io_uring_socket_service_base.ipp +249 -0
  615. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/kqueue_reactor.hpp +113 -0
  616. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/kqueue_reactor.ipp +599 -0
  617. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/null_event.ipp +74 -0
  618. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/pipe_select_interrupter.ipp +129 -0
  619. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/posix_event.ipp +63 -0
  620. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/posix_mutex.ipp +46 -0
  621. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/posix_serial_port_service.ipp +149 -0
  622. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/posix_thread.ipp +84 -0
  623. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/posix_tss_ptr.ipp +46 -0
  624. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/reactive_descriptor_service.ipp +225 -0
  625. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/reactive_socket_service_base.ipp +302 -0
  626. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/resolver_service_base.ipp +158 -0
  627. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/scheduler.ipp +674 -0
  628. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/select_reactor.hpp +124 -0
  629. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/select_reactor.ipp +357 -0
  630. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/service_registry.hpp +94 -0
  631. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/service_registry.ipp +197 -0
  632. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/signal_set_service.ipp +746 -0
  633. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/socket_ops.ipp +3964 -0
  634. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/socket_select_interrupter.ipp +185 -0
  635. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/strand_executor_service.hpp +354 -0
  636. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/strand_executor_service.ipp +158 -0
  637. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/strand_service.hpp +87 -0
  638. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/strand_service.ipp +202 -0
  639. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/thread_context.ipp +35 -0
  640. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/throw_error.ipp +66 -0
  641. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/timer_queue_ptime.ipp +97 -0
  642. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/timer_queue_set.ipp +101 -0
  643. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/win_event.ipp +76 -0
  644. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/win_iocp_file_service.ipp +250 -0
  645. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/win_iocp_handle_service.ipp +525 -0
  646. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/win_iocp_io_context.hpp +120 -0
  647. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/win_iocp_io_context.ipp +608 -0
  648. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/win_iocp_serial_port_service.ipp +192 -0
  649. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/win_iocp_socket_service_base.ipp +821 -0
  650. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/win_mutex.ipp +84 -0
  651. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/win_object_handle_service.ipp +448 -0
  652. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/win_static_mutex.ipp +136 -0
  653. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/win_thread.ipp +150 -0
  654. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/win_tss_ptr.ipp +57 -0
  655. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/winrt_ssocket_service_base.ipp +626 -0
  656. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/winrt_timer_scheduler.hpp +92 -0
  657. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/winrt_timer_scheduler.ipp +121 -0
  658. data/ext/couchbase/third_party/asio/asio/include/asio/detail/impl/winsock_init.ipp +82 -0
  659. data/ext/couchbase/third_party/asio/asio/include/asio/detail/io_control.hpp +84 -0
  660. data/ext/couchbase/third_party/asio/asio/include/asio/detail/io_object_impl.hpp +172 -0
  661. data/ext/couchbase/third_party/asio/asio/include/asio/detail/io_uring_descriptor_read_at_op.hpp +190 -0
  662. data/ext/couchbase/third_party/asio/asio/include/asio/detail/io_uring_descriptor_read_op.hpp +185 -0
  663. data/ext/couchbase/third_party/asio/asio/include/asio/detail/io_uring_descriptor_service.hpp +661 -0
  664. data/ext/couchbase/third_party/asio/asio/include/asio/detail/io_uring_descriptor_write_at_op.hpp +184 -0
  665. data/ext/couchbase/third_party/asio/asio/include/asio/detail/io_uring_descriptor_write_op.hpp +180 -0
  666. data/ext/couchbase/third_party/asio/asio/include/asio/detail/io_uring_file_service.hpp +251 -0
  667. data/ext/couchbase/third_party/asio/asio/include/asio/detail/io_uring_null_buffers_op.hpp +111 -0
  668. data/ext/couchbase/third_party/asio/asio/include/asio/detail/io_uring_operation.hpp +84 -0
  669. data/ext/couchbase/third_party/asio/asio/include/asio/detail/io_uring_service.hpp +318 -0
  670. data/ext/couchbase/third_party/asio/asio/include/asio/detail/io_uring_socket_accept_op.hpp +277 -0
  671. data/ext/couchbase/third_party/asio/asio/include/asio/detail/io_uring_socket_connect_op.hpp +137 -0
  672. data/ext/couchbase/third_party/asio/asio/include/asio/detail/io_uring_socket_recv_op.hpp +200 -0
  673. data/ext/couchbase/third_party/asio/asio/include/asio/detail/io_uring_socket_recvfrom_op.hpp +201 -0
  674. data/ext/couchbase/third_party/asio/asio/include/asio/detail/io_uring_socket_recvmsg_op.hpp +187 -0
  675. data/ext/couchbase/third_party/asio/asio/include/asio/detail/io_uring_socket_send_op.hpp +186 -0
  676. data/ext/couchbase/third_party/asio/asio/include/asio/detail/io_uring_socket_sendto_op.hpp +189 -0
  677. data/ext/couchbase/third_party/asio/asio/include/asio/detail/io_uring_socket_service.hpp +613 -0
  678. data/ext/couchbase/third_party/asio/asio/include/asio/detail/io_uring_socket_service_base.hpp +663 -0
  679. data/ext/couchbase/third_party/asio/asio/include/asio/detail/io_uring_wait_op.hpp +109 -0
  680. data/ext/couchbase/third_party/asio/asio/include/asio/detail/is_buffer_sequence.hpp +338 -0
  681. data/ext/couchbase/third_party/asio/asio/include/asio/detail/is_executor.hpp +126 -0
  682. data/ext/couchbase/third_party/asio/asio/include/asio/detail/keyword_tss_ptr.hpp +70 -0
  683. data/ext/couchbase/third_party/asio/asio/include/asio/detail/kqueue_reactor.hpp +254 -0
  684. data/ext/couchbase/third_party/asio/asio/include/asio/detail/limits.hpp +26 -0
  685. data/ext/couchbase/third_party/asio/asio/include/asio/detail/local_free_on_block_exit.hpp +59 -0
  686. data/ext/couchbase/third_party/asio/asio/include/asio/detail/macos_fenced_block.hpp +62 -0
  687. data/ext/couchbase/third_party/asio/asio/include/asio/detail/memory.hpp +133 -0
  688. data/ext/couchbase/third_party/asio/asio/include/asio/detail/mutex.hpp +48 -0
  689. data/ext/couchbase/third_party/asio/asio/include/asio/detail/non_const_lvalue.hpp +54 -0
  690. data/ext/couchbase/third_party/asio/asio/include/asio/detail/noncopyable.hpp +43 -0
  691. data/ext/couchbase/third_party/asio/asio/include/asio/detail/null_event.hpp +106 -0
  692. data/ext/couchbase/third_party/asio/asio/include/asio/detail/null_fenced_block.hpp +47 -0
  693. data/ext/couchbase/third_party/asio/asio/include/asio/detail/null_global.hpp +59 -0
  694. data/ext/couchbase/third_party/asio/asio/include/asio/detail/null_mutex.hpp +60 -0
  695. data/ext/couchbase/third_party/asio/asio/include/asio/detail/null_reactor.hpp +83 -0
  696. data/ext/couchbase/third_party/asio/asio/include/asio/detail/null_signal_blocker.hpp +69 -0
  697. data/ext/couchbase/third_party/asio/asio/include/asio/detail/null_socket_service.hpp +519 -0
  698. data/ext/couchbase/third_party/asio/asio/include/asio/detail/null_static_mutex.hpp +60 -0
  699. data/ext/couchbase/third_party/asio/asio/include/asio/detail/null_thread.hpp +67 -0
  700. data/ext/couchbase/third_party/asio/asio/include/asio/detail/null_tss_ptr.hpp +68 -0
  701. data/ext/couchbase/third_party/asio/asio/include/asio/detail/object_pool.hpp +171 -0
  702. data/ext/couchbase/third_party/asio/asio/include/asio/detail/old_win_sdk_compat.hpp +214 -0
  703. data/ext/couchbase/third_party/asio/asio/include/asio/detail/op_queue.hpp +162 -0
  704. data/ext/couchbase/third_party/asio/asio/include/asio/detail/operation.hpp +38 -0
  705. data/ext/couchbase/third_party/asio/asio/include/asio/detail/pipe_select_interrupter.hpp +89 -0
  706. data/ext/couchbase/third_party/asio/asio/include/asio/detail/pop_options.hpp +153 -0
  707. data/ext/couchbase/third_party/asio/asio/include/asio/detail/posix_event.hpp +175 -0
  708. data/ext/couchbase/third_party/asio/asio/include/asio/detail/posix_fd_set_adapter.hpp +118 -0
  709. data/ext/couchbase/third_party/asio/asio/include/asio/detail/posix_global.hpp +80 -0
  710. data/ext/couchbase/third_party/asio/asio/include/asio/detail/posix_mutex.hpp +76 -0
  711. data/ext/couchbase/third_party/asio/asio/include/asio/detail/posix_serial_port_service.hpp +248 -0
  712. data/ext/couchbase/third_party/asio/asio/include/asio/detail/posix_signal_blocker.hpp +85 -0
  713. data/ext/couchbase/third_party/asio/asio/include/asio/detail/posix_static_mutex.hpp +64 -0
  714. data/ext/couchbase/third_party/asio/asio/include/asio/detail/posix_thread.hpp +109 -0
  715. data/ext/couchbase/third_party/asio/asio/include/asio/detail/posix_tss_ptr.hpp +79 -0
  716. data/ext/couchbase/third_party/asio/asio/include/asio/detail/push_options.hpp +219 -0
  717. data/ext/couchbase/third_party/asio/asio/include/asio/detail/reactive_descriptor_service.hpp +511 -0
  718. data/ext/couchbase/third_party/asio/asio/include/asio/detail/reactive_null_buffers_op.hpp +98 -0
  719. data/ext/couchbase/third_party/asio/asio/include/asio/detail/reactive_socket_accept_op.hpp +242 -0
  720. data/ext/couchbase/third_party/asio/asio/include/asio/detail/reactive_socket_connect_op.hpp +123 -0
  721. data/ext/couchbase/third_party/asio/asio/include/asio/detail/reactive_socket_recv_op.hpp +159 -0
  722. data/ext/couchbase/third_party/asio/asio/include/asio/detail/reactive_socket_recvfrom_op.hpp +164 -0
  723. data/ext/couchbase/third_party/asio/asio/include/asio/detail/reactive_socket_recvmsg_op.hpp +145 -0
  724. data/ext/couchbase/third_party/asio/asio/include/asio/detail/reactive_socket_send_op.hpp +162 -0
  725. data/ext/couchbase/third_party/asio/asio/include/asio/detail/reactive_socket_sendto_op.hpp +156 -0
  726. data/ext/couchbase/third_party/asio/asio/include/asio/detail/reactive_socket_service.hpp +607 -0
  727. data/ext/couchbase/third_party/asio/asio/include/asio/detail/reactive_socket_service_base.hpp +654 -0
  728. data/ext/couchbase/third_party/asio/asio/include/asio/detail/reactive_wait_op.hpp +98 -0
  729. data/ext/couchbase/third_party/asio/asio/include/asio/detail/reactor.hpp +54 -0
  730. data/ext/couchbase/third_party/asio/asio/include/asio/detail/reactor_op.hpp +71 -0
  731. data/ext/couchbase/third_party/asio/asio/include/asio/detail/reactor_op_queue.hpp +212 -0
  732. data/ext/couchbase/third_party/asio/asio/include/asio/detail/recycling_allocator.hpp +105 -0
  733. data/ext/couchbase/third_party/asio/asio/include/asio/detail/regex_fwd.hpp +44 -0
  734. data/ext/couchbase/third_party/asio/asio/include/asio/detail/resolve_endpoint_op.hpp +140 -0
  735. data/ext/couchbase/third_party/asio/asio/include/asio/detail/resolve_op.hpp +45 -0
  736. data/ext/couchbase/third_party/asio/asio/include/asio/detail/resolve_query_op.hpp +150 -0
  737. data/ext/couchbase/third_party/asio/asio/include/asio/detail/resolver_service.hpp +145 -0
  738. data/ext/couchbase/third_party/asio/asio/include/asio/detail/resolver_service_base.hpp +158 -0
  739. data/ext/couchbase/third_party/asio/asio/include/asio/detail/scheduler.hpp +241 -0
  740. data/ext/couchbase/third_party/asio/asio/include/asio/detail/scheduler_operation.hpp +78 -0
  741. data/ext/couchbase/third_party/asio/asio/include/asio/detail/scheduler_task.hpp +49 -0
  742. data/ext/couchbase/third_party/asio/asio/include/asio/detail/scheduler_thread_info.hpp +40 -0
  743. data/ext/couchbase/third_party/asio/asio/include/asio/detail/scoped_lock.hpp +101 -0
  744. data/ext/couchbase/third_party/asio/asio/include/asio/detail/scoped_ptr.hpp +87 -0
  745. data/ext/couchbase/third_party/asio/asio/include/asio/detail/select_interrupter.hpp +46 -0
  746. data/ext/couchbase/third_party/asio/asio/include/asio/detail/select_reactor.hpp +252 -0
  747. data/ext/couchbase/third_party/asio/asio/include/asio/detail/service_registry.hpp +164 -0
  748. data/ext/couchbase/third_party/asio/asio/include/asio/detail/signal_blocker.hpp +44 -0
  749. data/ext/couchbase/third_party/asio/asio/include/asio/detail/signal_handler.hpp +90 -0
  750. data/ext/couchbase/third_party/asio/asio/include/asio/detail/signal_init.hpp +47 -0
  751. data/ext/couchbase/third_party/asio/asio/include/asio/detail/signal_op.hpp +49 -0
  752. data/ext/couchbase/third_party/asio/asio/include/asio/detail/signal_set_service.hpp +241 -0
  753. data/ext/couchbase/third_party/asio/asio/include/asio/detail/socket_holder.hpp +98 -0
  754. data/ext/couchbase/third_party/asio/asio/include/asio/detail/socket_ops.hpp +383 -0
  755. data/ext/couchbase/third_party/asio/asio/include/asio/detail/socket_option.hpp +316 -0
  756. data/ext/couchbase/third_party/asio/asio/include/asio/detail/socket_select_interrupter.hpp +91 -0
  757. data/ext/couchbase/third_party/asio/asio/include/asio/detail/socket_types.hpp +417 -0
  758. data/ext/couchbase/third_party/asio/asio/include/asio/detail/solaris_fenced_block.hpp +62 -0
  759. data/ext/couchbase/third_party/asio/asio/include/asio/detail/source_location.hpp +45 -0
  760. data/ext/couchbase/third_party/asio/asio/include/asio/detail/static_mutex.hpp +52 -0
  761. data/ext/couchbase/third_party/asio/asio/include/asio/detail/std_event.hpp +188 -0
  762. data/ext/couchbase/third_party/asio/asio/include/asio/detail/std_fenced_block.hpp +62 -0
  763. data/ext/couchbase/third_party/asio/asio/include/asio/detail/std_global.hpp +70 -0
  764. data/ext/couchbase/third_party/asio/asio/include/asio/detail/std_mutex.hpp +73 -0
  765. data/ext/couchbase/third_party/asio/asio/include/asio/detail/std_static_mutex.hpp +81 -0
  766. data/ext/couchbase/third_party/asio/asio/include/asio/detail/std_thread.hpp +71 -0
  767. data/ext/couchbase/third_party/asio/asio/include/asio/detail/strand_executor_service.hpp +173 -0
  768. data/ext/couchbase/third_party/asio/asio/include/asio/detail/strand_service.hpp +144 -0
  769. data/ext/couchbase/third_party/asio/asio/include/asio/detail/string_view.hpp +47 -0
  770. data/ext/couchbase/third_party/asio/asio/include/asio/detail/thread.hpp +60 -0
  771. data/ext/couchbase/third_party/asio/asio/include/asio/detail/thread_context.hpp +51 -0
  772. data/ext/couchbase/third_party/asio/asio/include/asio/detail/thread_group.hpp +99 -0
  773. data/ext/couchbase/third_party/asio/asio/include/asio/detail/thread_info_base.hpp +260 -0
  774. data/ext/couchbase/third_party/asio/asio/include/asio/detail/throw_error.hpp +53 -0
  775. data/ext/couchbase/third_party/asio/asio/include/asio/detail/throw_exception.hpp +51 -0
  776. data/ext/couchbase/third_party/asio/asio/include/asio/detail/timer_queue.hpp +389 -0
  777. data/ext/couchbase/third_party/asio/asio/include/asio/detail/timer_queue_base.hpp +68 -0
  778. data/ext/couchbase/third_party/asio/asio/include/asio/detail/timer_queue_ptime.hpp +103 -0
  779. data/ext/couchbase/third_party/asio/asio/include/asio/detail/timer_queue_set.hpp +66 -0
  780. data/ext/couchbase/third_party/asio/asio/include/asio/detail/timer_scheduler.hpp +37 -0
  781. data/ext/couchbase/third_party/asio/asio/include/asio/detail/timer_scheduler_fwd.hpp +42 -0
  782. data/ext/couchbase/third_party/asio/asio/include/asio/detail/tss_ptr.hpp +69 -0
  783. data/ext/couchbase/third_party/asio/asio/include/asio/detail/type_traits.hpp +156 -0
  784. data/ext/couchbase/third_party/asio/asio/include/asio/detail/variadic_templates.hpp +294 -0
  785. data/ext/couchbase/third_party/asio/asio/include/asio/detail/wait_handler.hpp +90 -0
  786. data/ext/couchbase/third_party/asio/asio/include/asio/detail/wait_op.hpp +49 -0
  787. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_event.hpp +164 -0
  788. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_fd_set_adapter.hpp +149 -0
  789. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_fenced_block.hpp +90 -0
  790. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_global.hpp +71 -0
  791. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_iocp_file_service.hpp +280 -0
  792. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_iocp_handle_read_op.hpp +117 -0
  793. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_iocp_handle_service.hpp +403 -0
  794. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_iocp_handle_write_op.hpp +110 -0
  795. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_iocp_io_context.hpp +345 -0
  796. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_iocp_null_buffers_op.hpp +127 -0
  797. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_iocp_operation.hpp +96 -0
  798. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_iocp_overlapped_op.hpp +96 -0
  799. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_iocp_overlapped_ptr.hpp +171 -0
  800. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_iocp_serial_port_service.hpp +232 -0
  801. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_iocp_socket_accept_op.hpp +338 -0
  802. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_iocp_socket_connect_op.hpp +135 -0
  803. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_iocp_socket_recv_op.hpp +124 -0
  804. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_iocp_socket_recvfrom_op.hpp +133 -0
  805. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_iocp_socket_recvmsg_op.hpp +125 -0
  806. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_iocp_socket_send_op.hpp +118 -0
  807. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_iocp_socket_service.hpp +659 -0
  808. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_iocp_socket_service_base.hpp +832 -0
  809. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_iocp_thread_info.hpp +34 -0
  810. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_iocp_wait_op.hpp +128 -0
  811. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_mutex.hpp +78 -0
  812. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_object_handle_service.hpp +195 -0
  813. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_static_mutex.hpp +74 -0
  814. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_thread.hpp +147 -0
  815. data/ext/couchbase/third_party/asio/asio/include/asio/detail/win_tss_ptr.hpp +79 -0
  816. data/ext/couchbase/third_party/asio/asio/include/asio/detail/winapp_thread.hpp +124 -0
  817. data/ext/couchbase/third_party/asio/asio/include/asio/detail/wince_thread.hpp +124 -0
  818. data/ext/couchbase/third_party/asio/asio/include/asio/detail/winrt_async_manager.hpp +305 -0
  819. data/ext/couchbase/third_party/asio/asio/include/asio/detail/winrt_async_op.hpp +65 -0
  820. data/ext/couchbase/third_party/asio/asio/include/asio/detail/winrt_resolve_op.hpp +125 -0
  821. data/ext/couchbase/third_party/asio/asio/include/asio/detail/winrt_resolver_service.hpp +212 -0
  822. data/ext/couchbase/third_party/asio/asio/include/asio/detail/winrt_socket_connect_op.hpp +98 -0
  823. data/ext/couchbase/third_party/asio/asio/include/asio/detail/winrt_socket_recv_op.hpp +119 -0
  824. data/ext/couchbase/third_party/asio/asio/include/asio/detail/winrt_socket_send_op.hpp +110 -0
  825. data/ext/couchbase/third_party/asio/asio/include/asio/detail/winrt_ssocket_service.hpp +250 -0
  826. data/ext/couchbase/third_party/asio/asio/include/asio/detail/winrt_ssocket_service_base.hpp +362 -0
  827. data/ext/couchbase/third_party/asio/asio/include/asio/detail/winrt_timer_scheduler.hpp +147 -0
  828. data/ext/couchbase/third_party/asio/asio/include/asio/detail/winrt_utils.hpp +106 -0
  829. data/ext/couchbase/third_party/asio/asio/include/asio/detail/winsock_init.hpp +128 -0
  830. data/ext/couchbase/third_party/asio/asio/include/asio/detail/work_dispatcher.hpp +151 -0
  831. data/ext/couchbase/third_party/asio/asio/include/asio/detail/wrapped_handler.hpp +327 -0
  832. data/ext/couchbase/third_party/asio/asio/include/asio/dispatch.hpp +121 -0
  833. data/ext/couchbase/third_party/asio/asio/include/asio/error.hpp +356 -0
  834. data/ext/couchbase/third_party/asio/asio/include/asio/error_code.hpp +202 -0
  835. data/ext/couchbase/third_party/asio/asio/include/asio/execution/allocator.hpp +337 -0
  836. data/ext/couchbase/third_party/asio/asio/include/asio/execution/any_executor.hpp +2351 -0
  837. data/ext/couchbase/third_party/asio/asio/include/asio/execution/bad_executor.hpp +47 -0
  838. data/ext/couchbase/third_party/asio/asio/include/asio/execution/blocking.hpp +1551 -0
  839. data/ext/couchbase/third_party/asio/asio/include/asio/execution/blocking_adaptation.hpp +1212 -0
  840. data/ext/couchbase/third_party/asio/asio/include/asio/execution/bulk_execute.hpp +397 -0
  841. data/ext/couchbase/third_party/asio/asio/include/asio/execution/bulk_guarantee.hpp +1215 -0
  842. data/ext/couchbase/third_party/asio/asio/include/asio/execution/connect.hpp +489 -0
  843. data/ext/couchbase/third_party/asio/asio/include/asio/execution/context.hpp +233 -0
  844. data/ext/couchbase/third_party/asio/asio/include/asio/execution/context_as.hpp +221 -0
  845. data/ext/couchbase/third_party/asio/asio/include/asio/execution/detail/as_invocable.hpp +152 -0
  846. data/ext/couchbase/third_party/asio/asio/include/asio/execution/detail/as_operation.hpp +105 -0
  847. data/ext/couchbase/third_party/asio/asio/include/asio/execution/detail/as_receiver.hpp +128 -0
  848. data/ext/couchbase/third_party/asio/asio/include/asio/execution/detail/bulk_sender.hpp +261 -0
  849. data/ext/couchbase/third_party/asio/asio/include/asio/execution/detail/submit_receiver.hpp +233 -0
  850. data/ext/couchbase/third_party/asio/asio/include/asio/execution/detail/void_receiver.hpp +90 -0
  851. data/ext/couchbase/third_party/asio/asio/include/asio/execution/execute.hpp +283 -0
  852. data/ext/couchbase/third_party/asio/asio/include/asio/execution/executor.hpp +252 -0
  853. data/ext/couchbase/third_party/asio/asio/include/asio/execution/impl/bad_executor.ipp +40 -0
  854. data/ext/couchbase/third_party/asio/asio/include/asio/execution/impl/receiver_invocation_error.ipp +36 -0
  855. data/ext/couchbase/third_party/asio/asio/include/asio/execution/invocable_archetype.hpp +71 -0
  856. data/ext/couchbase/third_party/asio/asio/include/asio/execution/mapping.hpp +1116 -0
  857. data/ext/couchbase/third_party/asio/asio/include/asio/execution/occupancy.hpp +226 -0
  858. data/ext/couchbase/third_party/asio/asio/include/asio/execution/operation_state.hpp +94 -0
  859. data/ext/couchbase/third_party/asio/asio/include/asio/execution/outstanding_work.hpp +867 -0
  860. data/ext/couchbase/third_party/asio/asio/include/asio/execution/prefer_only.hpp +331 -0
  861. data/ext/couchbase/third_party/asio/asio/include/asio/execution/receiver.hpp +280 -0
  862. data/ext/couchbase/third_party/asio/asio/include/asio/execution/receiver_invocation_error.hpp +48 -0
  863. data/ext/couchbase/third_party/asio/asio/include/asio/execution/relationship.hpp +865 -0
  864. data/ext/couchbase/third_party/asio/asio/include/asio/execution/schedule.hpp +287 -0
  865. data/ext/couchbase/third_party/asio/asio/include/asio/execution/scheduler.hpp +86 -0
  866. data/ext/couchbase/third_party/asio/asio/include/asio/execution/sender.hpp +311 -0
  867. data/ext/couchbase/third_party/asio/asio/include/asio/execution/set_done.hpp +250 -0
  868. data/ext/couchbase/third_party/asio/asio/include/asio/execution/set_error.hpp +250 -0
  869. data/ext/couchbase/third_party/asio/asio/include/asio/execution/set_value.hpp +483 -0
  870. data/ext/couchbase/third_party/asio/asio/include/asio/execution/start.hpp +247 -0
  871. data/ext/couchbase/third_party/asio/asio/include/asio/execution/submit.hpp +450 -0
  872. data/ext/couchbase/third_party/asio/asio/include/asio/execution.hpp +48 -0
  873. data/ext/couchbase/third_party/asio/asio/include/asio/execution_context.hpp +412 -0
  874. data/ext/couchbase/third_party/asio/asio/include/asio/executor.hpp +347 -0
  875. data/ext/couchbase/third_party/asio/asio/include/asio/executor_work_guard.hpp +302 -0
  876. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/append.hpp +71 -0
  877. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/as_single.hpp +135 -0
  878. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/as_tuple.hpp +131 -0
  879. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/awaitable_operators.hpp +536 -0
  880. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/basic_channel.hpp +415 -0
  881. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/basic_concurrent_channel.hpp +424 -0
  882. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/cancellation_condition.hpp +155 -0
  883. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/channel.hpp +70 -0
  884. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/channel_error.hpp +84 -0
  885. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/channel_traits.hpp +231 -0
  886. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/co_spawn.hpp +191 -0
  887. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/concurrent_channel.hpp +70 -0
  888. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/coro.hpp +263 -0
  889. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/coro_traits.hpp +228 -0
  890. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/deferred.hpp +605 -0
  891. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/detail/channel_handler.hpp +70 -0
  892. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/detail/channel_message.hpp +122 -0
  893. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/detail/channel_operation.hpp +199 -0
  894. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/detail/channel_payload.hpp +93 -0
  895. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/detail/channel_receive_op.hpp +112 -0
  896. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/detail/channel_send_functions.hpp +131 -0
  897. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/detail/channel_send_op.hpp +140 -0
  898. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/detail/channel_service.hpp +497 -0
  899. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/detail/completion_handler_erasure.hpp +158 -0
  900. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/detail/coro_promise_allocator.hpp +118 -0
  901. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/detail/has_signature.hpp +54 -0
  902. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/detail/impl/channel_service.hpp +611 -0
  903. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/detail/partial_promise.hpp +176 -0
  904. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/impl/append.hpp +217 -0
  905. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/impl/as_single.hpp +229 -0
  906. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/impl/as_tuple.hpp +246 -0
  907. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/impl/channel_error.ipp +61 -0
  908. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/impl/coro.hpp +1204 -0
  909. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/impl/deferred.hpp +104 -0
  910. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/impl/parallel_group.hpp +432 -0
  911. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/impl/prepend.hpp +217 -0
  912. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/impl/promise.hpp +102 -0
  913. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/impl/use_coro.hpp +267 -0
  914. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/parallel_group.hpp +215 -0
  915. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/prepend.hpp +71 -0
  916. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/promise.hpp +610 -0
  917. data/ext/couchbase/third_party/asio/asio/include/asio/experimental/use_coro.hpp +169 -0
  918. data/ext/couchbase/third_party/asio/asio/include/asio/file_base.hpp +160 -0
  919. data/ext/couchbase/third_party/asio/asio/include/asio/generic/basic_endpoint.hpp +193 -0
  920. data/ext/couchbase/third_party/asio/asio/include/asio/generic/datagram_protocol.hpp +123 -0
  921. data/ext/couchbase/third_party/asio/asio/include/asio/generic/detail/endpoint.hpp +133 -0
  922. data/ext/couchbase/third_party/asio/asio/include/asio/generic/detail/impl/endpoint.ipp +110 -0
  923. data/ext/couchbase/third_party/asio/asio/include/asio/generic/raw_protocol.hpp +121 -0
  924. data/ext/couchbase/third_party/asio/asio/include/asio/generic/seq_packet_protocol.hpp +122 -0
  925. data/ext/couchbase/third_party/asio/asio/include/asio/generic/stream_protocol.hpp +127 -0
  926. data/ext/couchbase/third_party/asio/asio/include/asio/handler_alloc_hook.hpp +104 -0
  927. data/ext/couchbase/third_party/asio/asio/include/asio/handler_continuation_hook.hpp +54 -0
  928. data/ext/couchbase/third_party/asio/asio/include/asio/handler_invoke_hook.hpp +111 -0
  929. data/ext/couchbase/third_party/asio/asio/include/asio/high_resolution_timer.hpp +44 -0
  930. data/ext/couchbase/third_party/asio/asio/include/asio/impl/any_io_executor.ipp +124 -0
  931. data/ext/couchbase/third_party/asio/asio/include/asio/impl/awaitable.hpp +760 -0
  932. data/ext/couchbase/third_party/asio/asio/include/asio/impl/buffered_read_stream.hpp +498 -0
  933. data/ext/couchbase/third_party/asio/asio/include/asio/impl/buffered_write_stream.hpp +478 -0
  934. data/ext/couchbase/third_party/asio/asio/include/asio/impl/cancellation_signal.ipp +96 -0
  935. data/ext/couchbase/third_party/asio/asio/include/asio/impl/co_spawn.hpp +346 -0
  936. data/ext/couchbase/third_party/asio/asio/include/asio/impl/compose.hpp +707 -0
  937. data/ext/couchbase/third_party/asio/asio/include/asio/impl/connect.hpp +905 -0
  938. data/ext/couchbase/third_party/asio/asio/include/asio/impl/connect_pipe.hpp +73 -0
  939. data/ext/couchbase/third_party/asio/asio/include/asio/impl/connect_pipe.ipp +149 -0
  940. data/ext/couchbase/third_party/asio/asio/include/asio/impl/defer.hpp +256 -0
  941. data/ext/couchbase/third_party/asio/asio/include/asio/impl/detached.hpp +130 -0
  942. data/ext/couchbase/third_party/asio/asio/include/asio/impl/dispatch.hpp +251 -0
  943. data/ext/couchbase/third_party/asio/asio/include/asio/impl/error.ipp +128 -0
  944. data/ext/couchbase/third_party/asio/asio/include/asio/impl/error_code.ipp +206 -0
  945. data/ext/couchbase/third_party/asio/asio/include/asio/impl/execution_context.hpp +109 -0
  946. data/ext/couchbase/third_party/asio/asio/include/asio/impl/execution_context.ipp +82 -0
  947. data/ext/couchbase/third_party/asio/asio/include/asio/impl/executor.hpp +300 -0
  948. data/ext/couchbase/third_party/asio/asio/include/asio/impl/executor.ipp +43 -0
  949. data/ext/couchbase/third_party/asio/asio/include/asio/impl/handler_alloc_hook.ipp +62 -0
  950. data/ext/couchbase/third_party/asio/asio/include/asio/impl/io_context.hpp +444 -0
  951. data/ext/couchbase/third_party/asio/asio/include/asio/impl/io_context.ipp +175 -0
  952. data/ext/couchbase/third_party/asio/asio/include/asio/impl/multiple_exceptions.ipp +49 -0
  953. data/ext/couchbase/third_party/asio/asio/include/asio/impl/post.hpp +256 -0
  954. data/ext/couchbase/third_party/asio/asio/include/asio/impl/read.hpp +1199 -0
  955. data/ext/couchbase/third_party/asio/asio/include/asio/impl/read_at.hpp +733 -0
  956. data/ext/couchbase/third_party/asio/asio/include/asio/impl/read_until.hpp +3315 -0
  957. data/ext/couchbase/third_party/asio/asio/include/asio/impl/redirect_error.hpp +609 -0
  958. data/ext/couchbase/third_party/asio/asio/include/asio/impl/serial_port_base.hpp +59 -0
  959. data/ext/couchbase/third_party/asio/asio/include/asio/impl/serial_port_base.ipp +554 -0
  960. data/ext/couchbase/third_party/asio/asio/include/asio/impl/spawn.hpp +517 -0
  961. data/ext/couchbase/third_party/asio/asio/include/asio/impl/src.hpp +95 -0
  962. data/ext/couchbase/third_party/asio/asio/include/asio/impl/system_context.hpp +34 -0
  963. data/ext/couchbase/third_party/asio/asio/include/asio/impl/system_context.ipp +92 -0
  964. data/ext/couchbase/third_party/asio/asio/include/asio/impl/system_executor.hpp +185 -0
  965. data/ext/couchbase/third_party/asio/asio/include/asio/impl/thread_pool.hpp +354 -0
  966. data/ext/couchbase/third_party/asio/asio/include/asio/impl/thread_pool.ipp +141 -0
  967. data/ext/couchbase/third_party/asio/asio/include/asio/impl/use_awaitable.hpp +291 -0
  968. data/ext/couchbase/third_party/asio/asio/include/asio/impl/use_future.hpp +1028 -0
  969. data/ext/couchbase/third_party/asio/asio/include/asio/impl/write.hpp +1100 -0
  970. data/ext/couchbase/third_party/asio/asio/include/asio/impl/write_at.hpp +644 -0
  971. data/ext/couchbase/third_party/asio/asio/include/asio/io_context.hpp +1560 -0
  972. data/ext/couchbase/third_party/asio/asio/include/asio/io_context_strand.hpp +376 -0
  973. data/ext/couchbase/third_party/asio/asio/include/asio/io_service.hpp +33 -0
  974. data/ext/couchbase/third_party/asio/asio/include/asio/io_service_strand.hpp +20 -0
  975. data/ext/couchbase/third_party/asio/asio/include/asio/ip/address.hpp +290 -0
  976. data/ext/couchbase/third_party/asio/asio/include/asio/ip/address_v4.hpp +355 -0
  977. data/ext/couchbase/third_party/asio/asio/include/asio/ip/address_v4_iterator.hpp +162 -0
  978. data/ext/couchbase/third_party/asio/asio/include/asio/ip/address_v4_range.hpp +134 -0
  979. data/ext/couchbase/third_party/asio/asio/include/asio/ip/address_v6.hpp +382 -0
  980. data/ext/couchbase/third_party/asio/asio/include/asio/ip/address_v6_iterator.hpp +183 -0
  981. data/ext/couchbase/third_party/asio/asio/include/asio/ip/address_v6_range.hpp +129 -0
  982. data/ext/couchbase/third_party/asio/asio/include/asio/ip/bad_address_cast.hpp +53 -0
  983. data/ext/couchbase/third_party/asio/asio/include/asio/ip/basic_endpoint.hpp +291 -0
  984. data/ext/couchbase/third_party/asio/asio/include/asio/ip/basic_resolver.hpp +1076 -0
  985. data/ext/couchbase/third_party/asio/asio/include/asio/ip/basic_resolver_entry.hpp +113 -0
  986. data/ext/couchbase/third_party/asio/asio/include/asio/ip/basic_resolver_iterator.hpp +192 -0
  987. data/ext/couchbase/third_party/asio/asio/include/asio/ip/basic_resolver_query.hpp +244 -0
  988. data/ext/couchbase/third_party/asio/asio/include/asio/ip/basic_resolver_results.hpp +311 -0
  989. data/ext/couchbase/third_party/asio/asio/include/asio/ip/detail/endpoint.hpp +141 -0
  990. data/ext/couchbase/third_party/asio/asio/include/asio/ip/detail/impl/endpoint.ipp +199 -0
  991. data/ext/couchbase/third_party/asio/asio/include/asio/ip/detail/socket_option.hpp +566 -0
  992. data/ext/couchbase/third_party/asio/asio/include/asio/ip/host_name.hpp +42 -0
  993. data/ext/couchbase/third_party/asio/asio/include/asio/ip/icmp.hpp +115 -0
  994. data/ext/couchbase/third_party/asio/asio/include/asio/ip/impl/address.hpp +67 -0
  995. data/ext/couchbase/third_party/asio/asio/include/asio/ip/impl/address.ipp +239 -0
  996. data/ext/couchbase/third_party/asio/asio/include/asio/ip/impl/address_v4.hpp +67 -0
  997. data/ext/couchbase/third_party/asio/asio/include/asio/ip/impl/address_v4.ipp +210 -0
  998. data/ext/couchbase/third_party/asio/asio/include/asio/ip/impl/address_v6.hpp +67 -0
  999. data/ext/couchbase/third_party/asio/asio/include/asio/ip/impl/address_v6.ipp +350 -0
  1000. data/ext/couchbase/third_party/asio/asio/include/asio/ip/impl/basic_endpoint.hpp +43 -0
  1001. data/ext/couchbase/third_party/asio/asio/include/asio/ip/impl/host_name.ipp +54 -0
  1002. data/ext/couchbase/third_party/asio/asio/include/asio/ip/impl/network_v4.hpp +54 -0
  1003. data/ext/couchbase/third_party/asio/asio/include/asio/ip/impl/network_v4.ipp +216 -0
  1004. data/ext/couchbase/third_party/asio/asio/include/asio/ip/impl/network_v6.hpp +53 -0
  1005. data/ext/couchbase/third_party/asio/asio/include/asio/ip/impl/network_v6.ipp +185 -0
  1006. data/ext/couchbase/third_party/asio/asio/include/asio/ip/multicast.hpp +191 -0
  1007. data/ext/couchbase/third_party/asio/asio/include/asio/ip/network_v4.hpp +261 -0
  1008. data/ext/couchbase/third_party/asio/asio/include/asio/ip/network_v6.hpp +235 -0
  1009. data/ext/couchbase/third_party/asio/asio/include/asio/ip/resolver_base.hpp +129 -0
  1010. data/ext/couchbase/third_party/asio/asio/include/asio/ip/resolver_query_base.hpp +43 -0
  1011. data/ext/couchbase/third_party/asio/asio/include/asio/ip/tcp.hpp +155 -0
  1012. data/ext/couchbase/third_party/asio/asio/include/asio/ip/udp.hpp +111 -0
  1013. data/ext/couchbase/third_party/asio/asio/include/asio/ip/unicast.hpp +70 -0
  1014. data/ext/couchbase/third_party/asio/asio/include/asio/ip/v6_only.hpp +69 -0
  1015. data/ext/couchbase/third_party/asio/asio/include/asio/is_applicable_property.hpp +61 -0
  1016. data/ext/couchbase/third_party/asio/asio/include/asio/is_executor.hpp +46 -0
  1017. data/ext/couchbase/third_party/asio/asio/include/asio/is_read_buffered.hpp +59 -0
  1018. data/ext/couchbase/third_party/asio/asio/include/asio/is_write_buffered.hpp +59 -0
  1019. data/ext/couchbase/third_party/asio/asio/include/asio/local/basic_endpoint.hpp +247 -0
  1020. data/ext/couchbase/third_party/asio/asio/include/asio/local/connect_pair.hpp +101 -0
  1021. data/ext/couchbase/third_party/asio/asio/include/asio/local/datagram_protocol.hpp +80 -0
  1022. data/ext/couchbase/third_party/asio/asio/include/asio/local/detail/endpoint.hpp +139 -0
  1023. data/ext/couchbase/third_party/asio/asio/include/asio/local/detail/impl/endpoint.ipp +131 -0
  1024. data/ext/couchbase/third_party/asio/asio/include/asio/local/stream_protocol.hpp +90 -0
  1025. data/ext/couchbase/third_party/asio/asio/include/asio/multiple_exceptions.hpp +58 -0
  1026. data/ext/couchbase/third_party/asio/asio/include/asio/packaged_task.hpp +126 -0
  1027. data/ext/couchbase/third_party/asio/asio/include/asio/placeholders.hpp +151 -0
  1028. data/ext/couchbase/third_party/asio/asio/include/asio/posix/basic_descriptor.hpp +720 -0
  1029. data/ext/couchbase/third_party/asio/asio/include/asio/posix/basic_stream_descriptor.hpp +501 -0
  1030. data/ext/couchbase/third_party/asio/asio/include/asio/posix/descriptor.hpp +37 -0
  1031. data/ext/couchbase/third_party/asio/asio/include/asio/posix/descriptor_base.hpp +90 -0
  1032. data/ext/couchbase/third_party/asio/asio/include/asio/posix/stream_descriptor.hpp +37 -0
  1033. data/ext/couchbase/third_party/asio/asio/include/asio/post.hpp +126 -0
  1034. data/ext/couchbase/third_party/asio/asio/include/asio/prefer.hpp +734 -0
  1035. data/ext/couchbase/third_party/asio/asio/include/asio/query.hpp +324 -0
  1036. data/ext/couchbase/third_party/asio/asio/include/asio/random_access_file.hpp +35 -0
  1037. data/ext/couchbase/third_party/asio/asio/include/asio/read.hpp +1388 -0
  1038. data/ext/couchbase/third_party/asio/asio/include/asio/read_at.hpp +738 -0
  1039. data/ext/couchbase/third_party/asio/asio/include/asio/read_until.hpp +3031 -0
  1040. data/ext/couchbase/third_party/asio/asio/include/asio/readable_pipe.hpp +35 -0
  1041. data/ext/couchbase/third_party/asio/asio/include/asio/redirect_error.hpp +66 -0
  1042. data/ext/couchbase/third_party/asio/asio/include/asio/registered_buffer.hpp +356 -0
  1043. data/ext/couchbase/third_party/asio/asio/include/asio/require.hpp +571 -0
  1044. data/ext/couchbase/third_party/asio/asio/include/asio/require_concept.hpp +352 -0
  1045. data/ext/couchbase/third_party/asio/asio/include/asio/serial_port.hpp +36 -0
  1046. data/ext/couchbase/third_party/asio/asio/include/asio/serial_port_base.hpp +167 -0
  1047. data/ext/couchbase/third_party/asio/asio/include/asio/signal_set.hpp +28 -0
  1048. data/ext/couchbase/third_party/asio/asio/include/asio/socket_base.hpp +559 -0
  1049. data/ext/couchbase/third_party/asio/asio/include/asio/spawn.hpp +344 -0
  1050. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/context.hpp +761 -0
  1051. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/context_base.hpp +209 -0
  1052. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/detail/buffered_handshake_op.hpp +119 -0
  1053. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/detail/engine.hpp +170 -0
  1054. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/detail/handshake_op.hpp +67 -0
  1055. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/detail/impl/engine.ipp +363 -0
  1056. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/detail/impl/openssl_init.ipp +165 -0
  1057. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/detail/io.hpp +425 -0
  1058. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/detail/openssl_init.hpp +101 -0
  1059. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/detail/openssl_types.hpp +34 -0
  1060. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/detail/password_callback.hpp +66 -0
  1061. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/detail/read_op.hpp +72 -0
  1062. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/detail/shutdown_op.hpp +69 -0
  1063. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/detail/stream_core.hpp +206 -0
  1064. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/detail/verify_callback.hpp +62 -0
  1065. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/detail/write_op.hpp +76 -0
  1066. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/error.hpp +125 -0
  1067. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/host_name_verification.hpp +90 -0
  1068. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/impl/context.hpp +67 -0
  1069. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/impl/context.ipp +1245 -0
  1070. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/impl/error.ipp +102 -0
  1071. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/impl/host_name_verification.ipp +73 -0
  1072. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/impl/rfc2818_verification.ipp +164 -0
  1073. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/impl/src.hpp +29 -0
  1074. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/rfc2818_verification.hpp +98 -0
  1075. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/stream.hpp +972 -0
  1076. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/stream_base.hpp +52 -0
  1077. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/verify_context.hpp +67 -0
  1078. data/ext/couchbase/third_party/asio/asio/include/asio/ssl/verify_mode.hpp +63 -0
  1079. data/ext/couchbase/third_party/asio/asio/include/asio/ssl.hpp +28 -0
  1080. data/ext/couchbase/third_party/asio/asio/include/asio/static_thread_pool.hpp +31 -0
  1081. data/ext/couchbase/third_party/asio/asio/include/asio/steady_timer.hpp +42 -0
  1082. data/ext/couchbase/third_party/asio/asio/include/asio/strand.hpp +569 -0
  1083. data/ext/couchbase/third_party/asio/asio/include/asio/stream_file.hpp +35 -0
  1084. data/ext/couchbase/third_party/asio/asio/include/asio/streambuf.hpp +33 -0
  1085. data/ext/couchbase/third_party/asio/asio/include/asio/system_context.hpp +90 -0
  1086. data/ext/couchbase/third_party/asio/asio/include/asio/system_error.hpp +131 -0
  1087. data/ext/couchbase/third_party/asio/asio/include/asio/system_executor.hpp +684 -0
  1088. data/ext/couchbase/third_party/asio/asio/include/asio/system_timer.hpp +42 -0
  1089. data/ext/couchbase/third_party/asio/asio/include/asio/this_coro.hpp +280 -0
  1090. data/ext/couchbase/third_party/asio/asio/include/asio/thread.hpp +92 -0
  1091. data/ext/couchbase/third_party/asio/asio/include/asio/thread_pool.hpp +1140 -0
  1092. data/ext/couchbase/third_party/asio/asio/include/asio/time_traits.hpp +86 -0
  1093. data/ext/couchbase/third_party/asio/asio/include/asio/traits/bulk_execute_free.hpp +114 -0
  1094. data/ext/couchbase/third_party/asio/asio/include/asio/traits/bulk_execute_member.hpp +114 -0
  1095. data/ext/couchbase/third_party/asio/asio/include/asio/traits/connect_free.hpp +112 -0
  1096. data/ext/couchbase/third_party/asio/asio/include/asio/traits/connect_member.hpp +112 -0
  1097. data/ext/couchbase/third_party/asio/asio/include/asio/traits/equality_comparable.hpp +104 -0
  1098. data/ext/couchbase/third_party/asio/asio/include/asio/traits/execute_free.hpp +108 -0
  1099. data/ext/couchbase/third_party/asio/asio/include/asio/traits/execute_member.hpp +108 -0
  1100. data/ext/couchbase/third_party/asio/asio/include/asio/traits/prefer_free.hpp +108 -0
  1101. data/ext/couchbase/third_party/asio/asio/include/asio/traits/prefer_member.hpp +108 -0
  1102. data/ext/couchbase/third_party/asio/asio/include/asio/traits/query_free.hpp +108 -0
  1103. data/ext/couchbase/third_party/asio/asio/include/asio/traits/query_member.hpp +108 -0
  1104. data/ext/couchbase/third_party/asio/asio/include/asio/traits/query_static_constexpr_member.hpp +108 -0
  1105. data/ext/couchbase/third_party/asio/asio/include/asio/traits/require_concept_free.hpp +108 -0
  1106. data/ext/couchbase/third_party/asio/asio/include/asio/traits/require_concept_member.hpp +108 -0
  1107. data/ext/couchbase/third_party/asio/asio/include/asio/traits/require_free.hpp +108 -0
  1108. data/ext/couchbase/third_party/asio/asio/include/asio/traits/require_member.hpp +108 -0
  1109. data/ext/couchbase/third_party/asio/asio/include/asio/traits/schedule_free.hpp +108 -0
  1110. data/ext/couchbase/third_party/asio/asio/include/asio/traits/schedule_member.hpp +108 -0
  1111. data/ext/couchbase/third_party/asio/asio/include/asio/traits/set_done_free.hpp +108 -0
  1112. data/ext/couchbase/third_party/asio/asio/include/asio/traits/set_done_member.hpp +108 -0
  1113. data/ext/couchbase/third_party/asio/asio/include/asio/traits/set_error_free.hpp +112 -0
  1114. data/ext/couchbase/third_party/asio/asio/include/asio/traits/set_error_member.hpp +112 -0
  1115. data/ext/couchbase/third_party/asio/asio/include/asio/traits/set_value_free.hpp +234 -0
  1116. data/ext/couchbase/third_party/asio/asio/include/asio/traits/set_value_member.hpp +234 -0
  1117. data/ext/couchbase/third_party/asio/asio/include/asio/traits/start_free.hpp +108 -0
  1118. data/ext/couchbase/third_party/asio/asio/include/asio/traits/start_member.hpp +108 -0
  1119. data/ext/couchbase/third_party/asio/asio/include/asio/traits/static_query.hpp +108 -0
  1120. data/ext/couchbase/third_party/asio/asio/include/asio/traits/static_require.hpp +123 -0
  1121. data/ext/couchbase/third_party/asio/asio/include/asio/traits/static_require_concept.hpp +124 -0
  1122. data/ext/couchbase/third_party/asio/asio/include/asio/traits/submit_free.hpp +112 -0
  1123. data/ext/couchbase/third_party/asio/asio/include/asio/traits/submit_member.hpp +112 -0
  1124. data/ext/couchbase/third_party/asio/asio/include/asio/ts/buffer.hpp +24 -0
  1125. data/ext/couchbase/third_party/asio/asio/include/asio/ts/executor.hpp +35 -0
  1126. data/ext/couchbase/third_party/asio/asio/include/asio/ts/internet.hpp +40 -0
  1127. data/ext/couchbase/third_party/asio/asio/include/asio/ts/io_context.hpp +20 -0
  1128. data/ext/couchbase/third_party/asio/asio/include/asio/ts/net.hpp +26 -0
  1129. data/ext/couchbase/third_party/asio/asio/include/asio/ts/netfwd.hpp +254 -0
  1130. data/ext/couchbase/third_party/asio/asio/include/asio/ts/socket.hpp +27 -0
  1131. data/ext/couchbase/third_party/asio/asio/include/asio/ts/timer.hpp +26 -0
  1132. data/ext/couchbase/third_party/asio/asio/include/asio/unyield.hpp +21 -0
  1133. data/ext/couchbase/third_party/asio/asio/include/asio/use_awaitable.hpp +166 -0
  1134. data/ext/couchbase/third_party/asio/asio/include/asio/use_future.hpp +160 -0
  1135. data/ext/couchbase/third_party/asio/asio/include/asio/uses_executor.hpp +71 -0
  1136. data/ext/couchbase/third_party/asio/asio/include/asio/version.hpp +23 -0
  1137. data/ext/couchbase/third_party/asio/asio/include/asio/wait_traits.hpp +56 -0
  1138. data/ext/couchbase/third_party/asio/asio/include/asio/windows/basic_object_handle.hpp +435 -0
  1139. data/ext/couchbase/third_party/asio/asio/include/asio/windows/basic_overlapped_handle.hpp +361 -0
  1140. data/ext/couchbase/third_party/asio/asio/include/asio/windows/basic_random_access_handle.hpp +510 -0
  1141. data/ext/couchbase/third_party/asio/asio/include/asio/windows/basic_stream_handle.hpp +494 -0
  1142. data/ext/couchbase/third_party/asio/asio/include/asio/windows/object_handle.hpp +38 -0
  1143. data/ext/couchbase/third_party/asio/asio/include/asio/windows/overlapped_handle.hpp +39 -0
  1144. data/ext/couchbase/third_party/asio/asio/include/asio/windows/overlapped_ptr.hpp +145 -0
  1145. data/ext/couchbase/third_party/asio/asio/include/asio/windows/random_access_handle.hpp +37 -0
  1146. data/ext/couchbase/third_party/asio/asio/include/asio/windows/stream_handle.hpp +37 -0
  1147. data/ext/couchbase/third_party/asio/asio/include/asio/writable_pipe.hpp +35 -0
  1148. data/ext/couchbase/third_party/asio/asio/include/asio/write.hpp +1346 -0
  1149. data/ext/couchbase/third_party/asio/asio/include/asio/write_at.hpp +746 -0
  1150. data/ext/couchbase/third_party/asio/asio/include/asio/yield.hpp +23 -0
  1151. data/ext/couchbase/third_party/asio/asio/include/asio.hpp +201 -0
  1152. data/ext/couchbase/third_party/fmt/CMakeLists.txt +410 -0
  1153. data/ext/couchbase/third_party/fmt/ChangeLog.rst +4364 -0
  1154. data/ext/couchbase/third_party/fmt/LICENSE.rst +27 -0
  1155. data/ext/couchbase/third_party/fmt/README.rst +528 -0
  1156. data/ext/couchbase/third_party/fmt/include/fmt/args.h +244 -0
  1157. data/ext/couchbase/third_party/fmt/include/fmt/chrono.h +2055 -0
  1158. data/ext/couchbase/third_party/fmt/include/fmt/color.h +638 -0
  1159. data/ext/couchbase/third_party/fmt/include/fmt/compile.h +642 -0
  1160. data/ext/couchbase/third_party/fmt/include/fmt/core.h +3217 -0
  1161. data/ext/couchbase/third_party/fmt/include/fmt/format-inl.h +2637 -0
  1162. data/ext/couchbase/third_party/fmt/include/fmt/format.h +3120 -0
  1163. data/ext/couchbase/third_party/fmt/include/fmt/locale.h +2 -0
  1164. data/ext/couchbase/third_party/fmt/include/fmt/os.h +527 -0
  1165. data/ext/couchbase/third_party/fmt/include/fmt/ostream.h +135 -0
  1166. data/ext/couchbase/third_party/fmt/include/fmt/printf.h +657 -0
  1167. data/ext/couchbase/third_party/fmt/include/fmt/ranges.h +742 -0
  1168. data/ext/couchbase/third_party/fmt/include/fmt/xchar.h +236 -0
  1169. data/ext/couchbase/third_party/fmt/src/fmt.cc +99 -0
  1170. data/ext/couchbase/third_party/fmt/src/format.cc +124 -0
  1171. data/ext/couchbase/third_party/fmt/src/os.cc +361 -0
  1172. data/ext/couchbase/third_party/fmt/support/cmake/FindSetEnv.cmake +7 -0
  1173. data/ext/couchbase/third_party/fmt/support/cmake/JoinPaths.cmake +26 -0
  1174. data/ext/couchbase/third_party/fmt/support/cmake/cxx14.cmake +70 -0
  1175. data/ext/couchbase/third_party/fmt/support/cmake/fmt-config.cmake.in +4 -0
  1176. data/ext/couchbase/third_party/fmt/support/cmake/fmt.pc.in +11 -0
  1177. data/ext/couchbase/third_party/gsl/CMakeLists.txt +61 -0
  1178. data/ext/couchbase/third_party/gsl/LICENSE +21 -0
  1179. data/ext/couchbase/third_party/gsl/ThirdPartyNotices.txt +41 -0
  1180. data/ext/couchbase/third_party/gsl/cmake/guidelineSupportLibrary.cmake +116 -0
  1181. data/ext/couchbase/third_party/gsl/include/CMakeLists.txt +20 -0
  1182. data/ext/couchbase/third_party/gsl/include/gsl/algorithm +63 -0
  1183. data/ext/couchbase/third_party/gsl/include/gsl/assert +136 -0
  1184. data/ext/couchbase/third_party/gsl/include/gsl/byte +213 -0
  1185. data/ext/couchbase/third_party/gsl/include/gsl/gsl +32 -0
  1186. data/ext/couchbase/third_party/gsl/include/gsl/gsl_algorithm +4 -0
  1187. data/ext/couchbase/third_party/gsl/include/gsl/gsl_assert +3 -0
  1188. data/ext/couchbase/third_party/gsl/include/gsl/gsl_byte +3 -0
  1189. data/ext/couchbase/third_party/gsl/include/gsl/gsl_narrow +3 -0
  1190. data/ext/couchbase/third_party/gsl/include/gsl/gsl_util +3 -0
  1191. data/ext/couchbase/third_party/gsl/include/gsl/narrow +66 -0
  1192. data/ext/couchbase/third_party/gsl/include/gsl/pointers +323 -0
  1193. data/ext/couchbase/third_party/gsl/include/gsl/span +821 -0
  1194. data/ext/couchbase/third_party/gsl/include/gsl/span_ext +212 -0
  1195. data/ext/couchbase/third_party/gsl/include/gsl/string_span +767 -0
  1196. data/ext/couchbase/third_party/gsl/include/gsl/util +157 -0
  1197. data/ext/couchbase/third_party/hdr_histogram_c/CMakeLists.txt +84 -0
  1198. data/ext/couchbase/third_party/hdr_histogram_c/COPYING.txt +121 -0
  1199. data/ext/couchbase/third_party/hdr_histogram_c/LICENSE.txt +41 -0
  1200. data/ext/couchbase/third_party/hdr_histogram_c/config.cmake.in +6 -0
  1201. data/ext/couchbase/third_party/hdr_histogram_c/src/CMakeLists.txt +83 -0
  1202. data/ext/couchbase/third_party/hdr_histogram_c/src/hdr_atomic.h +146 -0
  1203. data/ext/couchbase/third_party/hdr_histogram_c/src/hdr_encoding.c +322 -0
  1204. data/ext/couchbase/third_party/hdr_histogram_c/src/hdr_encoding.h +79 -0
  1205. data/ext/couchbase/third_party/hdr_histogram_c/src/hdr_endian.h +116 -0
  1206. data/ext/couchbase/third_party/hdr_histogram_c/src/hdr_histogram.c +1211 -0
  1207. data/ext/couchbase/third_party/hdr_histogram_c/src/hdr_histogram.h +516 -0
  1208. data/ext/couchbase/third_party/hdr_histogram_c/src/hdr_histogram_log.c +1290 -0
  1209. data/ext/couchbase/third_party/hdr_histogram_c/src/hdr_histogram_log.h +236 -0
  1210. data/ext/couchbase/third_party/hdr_histogram_c/src/hdr_histogram_log_no_op.c +171 -0
  1211. data/ext/couchbase/third_party/hdr_histogram_c/src/hdr_interval_recorder.c +227 -0
  1212. data/ext/couchbase/third_party/hdr_histogram_c/src/hdr_interval_recorder.h +109 -0
  1213. data/ext/couchbase/third_party/hdr_histogram_c/src/hdr_malloc.h +19 -0
  1214. data/ext/couchbase/third_party/hdr_histogram_c/src/hdr_tests.h +22 -0
  1215. data/ext/couchbase/third_party/hdr_histogram_c/src/hdr_thread.c +108 -0
  1216. data/ext/couchbase/third_party/hdr_histogram_c/src/hdr_thread.h +55 -0
  1217. data/ext/couchbase/third_party/hdr_histogram_c/src/hdr_time.c +98 -0
  1218. data/ext/couchbase/third_party/hdr_histogram_c/src/hdr_time.h +49 -0
  1219. data/ext/couchbase/third_party/hdr_histogram_c/src/hdr_writer_reader_phaser.c +143 -0
  1220. data/ext/couchbase/third_party/hdr_histogram_c/src/hdr_writer_reader_phaser.h +51 -0
  1221. data/ext/couchbase/third_party/http_parser/LICENSE-MIT +19 -0
  1222. data/ext/couchbase/third_party/http_parser/http_parser.c +2575 -0
  1223. data/ext/couchbase/third_party/http_parser/http_parser.h +449 -0
  1224. data/ext/couchbase/third_party/json/CMakeLists.txt +90 -0
  1225. data/ext/couchbase/third_party/json/LICENSE +21 -0
  1226. data/ext/couchbase/third_party/json/LICENSE.double-conversion +32 -0
  1227. data/ext/couchbase/third_party/json/LICENSE.itoa +19 -0
  1228. data/ext/couchbase/third_party/json/LICENSE.ryu +201 -0
  1229. data/ext/couchbase/third_party/json/external/PEGTL/.cmake/pegtl-config.cmake.in +4 -0
  1230. data/ext/couchbase/third_party/json/external/PEGTL/.cmake/test_filesystem.cpp.in +22 -0
  1231. data/ext/couchbase/third_party/json/external/PEGTL/CMakeLists.txt +155 -0
  1232. data/ext/couchbase/third_party/json/external/PEGTL/LICENSE +21 -0
  1233. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/apply_mode.hpp +19 -0
  1234. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/argv_input.hpp +49 -0
  1235. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/ascii.hpp +54 -0
  1236. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/buffer_input.hpp +226 -0
  1237. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/change_action.hpp +38 -0
  1238. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/change_action_and_state.hpp +71 -0
  1239. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/change_action_and_states.hpp +62 -0
  1240. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/change_control.hpp +36 -0
  1241. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/change_state.hpp +69 -0
  1242. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/change_states.hpp +61 -0
  1243. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/config.hpp +11 -0
  1244. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/abnf.hpp +35 -0
  1245. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/add_state.hpp +69 -0
  1246. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/alphabet.hpp +67 -0
  1247. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/analyze.hpp +189 -0
  1248. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/analyze_traits.hpp +277 -0
  1249. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/check_bytes.hpp +55 -0
  1250. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/control_action.hpp +81 -0
  1251. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/coverage.hpp +151 -0
  1252. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/forward.hpp +16 -0
  1253. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/function.hpp +52 -0
  1254. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/http.hpp +277 -0
  1255. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/icu/internal.hpp +98 -0
  1256. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/icu/utf16.hpp +196 -0
  1257. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/icu/utf32.hpp +196 -0
  1258. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/icu/utf8.hpp +103 -0
  1259. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/if_then.hpp +56 -0
  1260. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/instantiate.hpp +38 -0
  1261. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/integer.hpp +468 -0
  1262. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/internal/endian.hpp +77 -0
  1263. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/internal/endian_gcc.hpp +198 -0
  1264. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/internal/endian_win.hpp +102 -0
  1265. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/internal/peek_mask_uint.hpp +54 -0
  1266. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/internal/peek_mask_uint8.hpp +33 -0
  1267. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/internal/peek_uint.hpp +45 -0
  1268. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/internal/peek_uint8.hpp +32 -0
  1269. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/internal/peek_utf16.hpp +54 -0
  1270. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/internal/peek_utf32.hpp +43 -0
  1271. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/internal/read_uint.hpp +77 -0
  1272. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/internal/set_stack_guard.hpp +52 -0
  1273. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/internal/vector_stack_guard.hpp +45 -0
  1274. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/iri.hpp +106 -0
  1275. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/json.hpp +91 -0
  1276. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/json_pointer.hpp +33 -0
  1277. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/limit_bytes.hpp +88 -0
  1278. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/limit_depth.hpp +83 -0
  1279. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/parse_tree.hpp +443 -0
  1280. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/parse_tree_to_dot.hpp +111 -0
  1281. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/peg.hpp +121 -0
  1282. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/predicates.hpp +126 -0
  1283. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/print.hpp +75 -0
  1284. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/print_coverage.hpp +53 -0
  1285. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/proto3.hpp +142 -0
  1286. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/raw_string.hpp +232 -0
  1287. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/remove_first_state.hpp +72 -0
  1288. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/remove_last_states.hpp +121 -0
  1289. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/rep_one_min_max.hpp +100 -0
  1290. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/rep_string.hpp +43 -0
  1291. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/separated_seq.hpp +45 -0
  1292. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/shuffle_states.hpp +193 -0
  1293. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/state_control.hpp +122 -0
  1294. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/to_string.hpp +38 -0
  1295. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/trace.hpp +227 -0
  1296. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/uint16.hpp +62 -0
  1297. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/uint32.hpp +62 -0
  1298. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/uint64.hpp +63 -0
  1299. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/uint8.hpp +36 -0
  1300. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/unescape.hpp +214 -0
  1301. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/uri.hpp +111 -0
  1302. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/utf16.hpp +57 -0
  1303. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/contrib/utf32.hpp +57 -0
  1304. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/cstream_input.hpp +32 -0
  1305. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/demangle.hpp +175 -0
  1306. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/disable_action.hpp +35 -0
  1307. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/discard_input.hpp +37 -0
  1308. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/discard_input_on_failure.hpp +39 -0
  1309. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/discard_input_on_success.hpp +39 -0
  1310. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/enable_action.hpp +35 -0
  1311. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/eol.hpp +37 -0
  1312. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/eol_pair.hpp +18 -0
  1313. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/file_input.hpp +44 -0
  1314. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/action.hpp +54 -0
  1315. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/action_input.hpp +106 -0
  1316. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/any.hpp +77 -0
  1317. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/apply.hpp +53 -0
  1318. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/apply0.hpp +51 -0
  1319. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/apply0_single.hpp +34 -0
  1320. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/apply_single.hpp +34 -0
  1321. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/at.hpp +55 -0
  1322. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/bof.hpp +32 -0
  1323. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/bol.hpp +31 -0
  1324. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/bump.hpp +45 -0
  1325. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/bump_help.hpp +26 -0
  1326. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/bytes.hpp +43 -0
  1327. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/control.hpp +54 -0
  1328. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/cr_crlf_eol.hpp +32 -0
  1329. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/cr_eol.hpp +32 -0
  1330. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/crlf_eol.hpp +32 -0
  1331. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/cstream_reader.hpp +58 -0
  1332. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/cstring_reader.hpp +40 -0
  1333. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/dependent_false.hpp +16 -0
  1334. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/dependent_true.hpp +16 -0
  1335. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/disable.hpp +54 -0
  1336. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/discard.hpp +34 -0
  1337. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/enable.hpp +54 -0
  1338. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/enable_control.hpp +25 -0
  1339. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/eof.hpp +32 -0
  1340. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/eol.hpp +32 -0
  1341. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/eolf.hpp +33 -0
  1342. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/failure.hpp +32 -0
  1343. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/file_mapper_posix.hpp +159 -0
  1344. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/file_mapper_win32.hpp +243 -0
  1345. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/file_reader.hpp +152 -0
  1346. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/filesystem.hpp +64 -0
  1347. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/has_apply.hpp +21 -0
  1348. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/has_apply0.hpp +21 -0
  1349. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/has_match.hpp +40 -0
  1350. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/has_unwind.hpp +21 -0
  1351. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/identifier.hpp +22 -0
  1352. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/if_apply.hpp +54 -0
  1353. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/if_must.hpp +52 -0
  1354. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/if_must_else.hpp +26 -0
  1355. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/if_then_else.hpp +51 -0
  1356. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/input_pair.hpp +29 -0
  1357. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/istream_reader.hpp +50 -0
  1358. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/istring.hpp +81 -0
  1359. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/iterator.hpp +49 -0
  1360. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/lf_crlf_eol.hpp +37 -0
  1361. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/lf_eol.hpp +32 -0
  1362. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/list.hpp +19 -0
  1363. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/list_must.hpp +25 -0
  1364. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/list_tail.hpp +22 -0
  1365. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/list_tail_pad.hpp +22 -0
  1366. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/marker.hpp +80 -0
  1367. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/minus.hpp +21 -0
  1368. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/missing_apply.hpp +28 -0
  1369. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/missing_apply0.hpp +26 -0
  1370. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/must.hpp +69 -0
  1371. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/not_at.hpp +55 -0
  1372. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/one.hpp +66 -0
  1373. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/opt.hpp +57 -0
  1374. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/pad.hpp +19 -0
  1375. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/pad_opt.hpp +20 -0
  1376. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/path_to_string.hpp +28 -0
  1377. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/peek_char.hpp +32 -0
  1378. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/peek_utf8.hpp +89 -0
  1379. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/pegtl_string.hpp +90 -0
  1380. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/plus.hpp +60 -0
  1381. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/raise.hpp +49 -0
  1382. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/range.hpp +60 -0
  1383. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/ranges.hpp +90 -0
  1384. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/rematch.hpp +72 -0
  1385. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/rep.hpp +67 -0
  1386. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/rep_min.hpp +20 -0
  1387. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/rep_min_max.hpp +81 -0
  1388. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/rep_opt.hpp +61 -0
  1389. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/require.hpp +42 -0
  1390. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/result_on_found.hpp +19 -0
  1391. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/rules.hpp +64 -0
  1392. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/seq.hpp +58 -0
  1393. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/sor.hpp +67 -0
  1394. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/star.hpp +52 -0
  1395. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/star_must.hpp +24 -0
  1396. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/state.hpp +75 -0
  1397. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/string.hpp +67 -0
  1398. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/success.hpp +32 -0
  1399. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/try_catch_type.hpp +69 -0
  1400. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/internal/until.hpp +88 -0
  1401. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/istream_input.hpp +32 -0
  1402. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/match.hpp +173 -0
  1403. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/memory_input.hpp +378 -0
  1404. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/mmap_input.hpp +79 -0
  1405. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/must_if.hpp +69 -0
  1406. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/normal.hpp +99 -0
  1407. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/nothing.hpp +19 -0
  1408. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/parse.hpp +72 -0
  1409. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/parse_error.hpp +119 -0
  1410. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/position.hpp +98 -0
  1411. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/read_input.hpp +54 -0
  1412. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/require_apply.hpp +16 -0
  1413. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/require_apply0.hpp +16 -0
  1414. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/rewind_mode.hpp +20 -0
  1415. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/rules.hpp +71 -0
  1416. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/string_input.hpp +64 -0
  1417. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/tracking_mode.hpp +19 -0
  1418. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/type_list.hpp +46 -0
  1419. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/utf8.hpp +28 -0
  1420. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/version.hpp +13 -0
  1421. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl/visit.hpp +80 -0
  1422. data/ext/couchbase/third_party/json/external/PEGTL/include/tao/pegtl.hpp +48 -0
  1423. data/ext/couchbase/third_party/json/include/tao/json/basic_value.hpp +962 -0
  1424. data/ext/couchbase/third_party/json/include/tao/json/binary.hpp +103 -0
  1425. data/ext/couchbase/third_party/json/include/tao/json/binary_view.hpp +31 -0
  1426. data/ext/couchbase/third_party/json/include/tao/json/binding/constant.hpp +231 -0
  1427. data/ext/couchbase/third_party/json/include/tao/json/binding/element.hpp +71 -0
  1428. data/ext/couchbase/third_party/json/include/tao/json/binding/element2.hpp +35 -0
  1429. data/ext/couchbase/third_party/json/include/tao/json/binding/factory.hpp +253 -0
  1430. data/ext/couchbase/third_party/json/include/tao/json/binding/for_nothing_value.hpp +17 -0
  1431. data/ext/couchbase/third_party/json/include/tao/json/binding/for_unknown_key.hpp +17 -0
  1432. data/ext/couchbase/third_party/json/include/tao/json/binding/inherit.hpp +14 -0
  1433. data/ext/couchbase/third_party/json/include/tao/json/binding/internal/array.hpp +105 -0
  1434. data/ext/couchbase/third_party/json/include/tao/json/binding/internal/elementr.hpp +134 -0
  1435. data/ext/couchbase/third_party/json/include/tao/json/binding/internal/elementw.hpp +251 -0
  1436. data/ext/couchbase/third_party/json/include/tao/json/binding/internal/inherit.hpp +45 -0
  1437. data/ext/couchbase/third_party/json/include/tao/json/binding/internal/object.hpp +269 -0
  1438. data/ext/couchbase/third_party/json/include/tao/json/binding/internal/type_key.hpp +54 -0
  1439. data/ext/couchbase/third_party/json/include/tao/json/binding/member.hpp +47 -0
  1440. data/ext/couchbase/third_party/json/include/tao/json/binding/member_kind.hpp +17 -0
  1441. data/ext/couchbase/third_party/json/include/tao/json/binding/versions.hpp +130 -0
  1442. data/ext/couchbase/third_party/json/include/tao/json/binding.hpp +74 -0
  1443. data/ext/couchbase/third_party/json/include/tao/json/cbor/consume_file.hpp +34 -0
  1444. data/ext/couchbase/third_party/json/include/tao/json/cbor/consume_string.hpp +32 -0
  1445. data/ext/couchbase/third_party/json/include/tao/json/cbor/events/from_binary.hpp +44 -0
  1446. data/ext/couchbase/third_party/json/include/tao/json/cbor/events/from_file.hpp +27 -0
  1447. data/ext/couchbase/third_party/json/include/tao/json/cbor/events/from_input.hpp +43 -0
  1448. data/ext/couchbase/third_party/json/include/tao/json/cbor/events/from_string.hpp +37 -0
  1449. data/ext/couchbase/third_party/json/include/tao/json/cbor/events/to_stream.hpp +161 -0
  1450. data/ext/couchbase/third_party/json/include/tao/json/cbor/events/to_string.hpp +37 -0
  1451. data/ext/couchbase/third_party/json/include/tao/json/cbor/from_binary.hpp +32 -0
  1452. data/ext/couchbase/third_party/json/include/tao/json/cbor/from_file.hpp +33 -0
  1453. data/ext/couchbase/third_party/json/include/tao/json/cbor/from_input.hpp +33 -0
  1454. data/ext/couchbase/third_party/json/include/tao/json/cbor/from_string.hpp +32 -0
  1455. data/ext/couchbase/third_party/json/include/tao/json/cbor/internal/grammar.hpp +424 -0
  1456. data/ext/couchbase/third_party/json/include/tao/json/cbor/internal/major.hpp +28 -0
  1457. data/ext/couchbase/third_party/json/include/tao/json/cbor/parts_parser.hpp +395 -0
  1458. data/ext/couchbase/third_party/json/include/tao/json/cbor/to_stream.hpp +27 -0
  1459. data/ext/couchbase/third_party/json/include/tao/json/cbor/to_string.hpp +29 -0
  1460. data/ext/couchbase/third_party/json/include/tao/json/cbor.hpp +19 -0
  1461. data/ext/couchbase/third_party/json/include/tao/json/consume.hpp +43 -0
  1462. data/ext/couchbase/third_party/json/include/tao/json/consume_file.hpp +33 -0
  1463. data/ext/couchbase/third_party/json/include/tao/json/consume_string.hpp +31 -0
  1464. data/ext/couchbase/third_party/json/include/tao/json/contrib/array_traits.hpp +43 -0
  1465. data/ext/couchbase/third_party/json/include/tao/json/contrib/deque_traits.hpp +41 -0
  1466. data/ext/couchbase/third_party/json/include/tao/json/contrib/diff.hpp +106 -0
  1467. data/ext/couchbase/third_party/json/include/tao/json/contrib/get.hpp +152 -0
  1468. data/ext/couchbase/third_party/json/include/tao/json/contrib/internal/array_traits.hpp +92 -0
  1469. data/ext/couchbase/third_party/json/include/tao/json/contrib/internal/indirect_traits.hpp +76 -0
  1470. data/ext/couchbase/third_party/json/include/tao/json/contrib/internal/object_traits.hpp +105 -0
  1471. data/ext/couchbase/third_party/json/include/tao/json/contrib/internal/type_traits.hpp +36 -0
  1472. data/ext/couchbase/third_party/json/include/tao/json/contrib/list_traits.hpp +41 -0
  1473. data/ext/couchbase/third_party/json/include/tao/json/contrib/map_traits.hpp +43 -0
  1474. data/ext/couchbase/third_party/json/include/tao/json/contrib/multimap_traits.hpp +43 -0
  1475. data/ext/couchbase/third_party/json/include/tao/json/contrib/multiset_traits.hpp +41 -0
  1476. data/ext/couchbase/third_party/json/include/tao/json/contrib/pair_traits.hpp +21 -0
  1477. data/ext/couchbase/third_party/json/include/tao/json/contrib/patch.hpp +117 -0
  1478. data/ext/couchbase/third_party/json/include/tao/json/contrib/pointer_traits.hpp +59 -0
  1479. data/ext/couchbase/third_party/json/include/tao/json/contrib/position.hpp +166 -0
  1480. data/ext/couchbase/third_party/json/include/tao/json/contrib/reference.hpp +113 -0
  1481. data/ext/couchbase/third_party/json/include/tao/json/contrib/schema.hpp +1874 -0
  1482. data/ext/couchbase/third_party/json/include/tao/json/contrib/set_traits.hpp +41 -0
  1483. data/ext/couchbase/third_party/json/include/tao/json/contrib/shared_ptr_traits.hpp +98 -0
  1484. data/ext/couchbase/third_party/json/include/tao/json/contrib/traits.hpp +128 -0
  1485. data/ext/couchbase/third_party/json/include/tao/json/contrib/tuple_traits.hpp +51 -0
  1486. data/ext/couchbase/third_party/json/include/tao/json/contrib/unique_ptr_traits.hpp +97 -0
  1487. data/ext/couchbase/third_party/json/include/tao/json/contrib/unordered_map_traits.hpp +43 -0
  1488. data/ext/couchbase/third_party/json/include/tao/json/contrib/unordered_set_traits.hpp +41 -0
  1489. data/ext/couchbase/third_party/json/include/tao/json/contrib/variant_traits.hpp +73 -0
  1490. data/ext/couchbase/third_party/json/include/tao/json/contrib/vector_bool_traits.hpp +45 -0
  1491. data/ext/couchbase/third_party/json/include/tao/json/contrib/vector_traits.hpp +51 -0
  1492. data/ext/couchbase/third_party/json/include/tao/json/events/apply.hpp +20 -0
  1493. data/ext/couchbase/third_party/json/include/tao/json/events/binary_to_base64.hpp +26 -0
  1494. data/ext/couchbase/third_party/json/include/tao/json/events/binary_to_base64url.hpp +28 -0
  1495. data/ext/couchbase/third_party/json/include/tao/json/events/binary_to_exception.hpp +27 -0
  1496. data/ext/couchbase/third_party/json/include/tao/json/events/binary_to_hex.hpp +26 -0
  1497. data/ext/couchbase/third_party/json/include/tao/json/events/compare.hpp +255 -0
  1498. data/ext/couchbase/third_party/json/include/tao/json/events/debug.hpp +145 -0
  1499. data/ext/couchbase/third_party/json/include/tao/json/events/discard.hpp +43 -0
  1500. data/ext/couchbase/third_party/json/include/tao/json/events/from_file.hpp +28 -0
  1501. data/ext/couchbase/third_party/json/include/tao/json/events/from_input.hpp +45 -0
  1502. data/ext/couchbase/third_party/json/include/tao/json/events/from_stream.hpp +33 -0
  1503. data/ext/couchbase/third_party/json/include/tao/json/events/from_string.hpp +38 -0
  1504. data/ext/couchbase/third_party/json/include/tao/json/events/from_value.hpp +205 -0
  1505. data/ext/couchbase/third_party/json/include/tao/json/events/hash.hpp +174 -0
  1506. data/ext/couchbase/third_party/json/include/tao/json/events/invalid_string_to_binary.hpp +50 -0
  1507. data/ext/couchbase/third_party/json/include/tao/json/events/invalid_string_to_exception.hpp +49 -0
  1508. data/ext/couchbase/third_party/json/include/tao/json/events/invalid_string_to_hex.hpp +48 -0
  1509. data/ext/couchbase/third_party/json/include/tao/json/events/key_camel_case_to_snake_case.hpp +62 -0
  1510. data/ext/couchbase/third_party/json/include/tao/json/events/key_snake_case_to_camel_case.hpp +57 -0
  1511. data/ext/couchbase/third_party/json/include/tao/json/events/limit_nesting_depth.hpp +82 -0
  1512. data/ext/couchbase/third_party/json/include/tao/json/events/limit_value_count.hpp +46 -0
  1513. data/ext/couchbase/third_party/json/include/tao/json/events/non_finite_to_exception.hpp +31 -0
  1514. data/ext/couchbase/third_party/json/include/tao/json/events/non_finite_to_null.hpp +32 -0
  1515. data/ext/couchbase/third_party/json/include/tao/json/events/non_finite_to_string.hpp +40 -0
  1516. data/ext/couchbase/third_party/json/include/tao/json/events/prefer_signed.hpp +32 -0
  1517. data/ext/couchbase/third_party/json/include/tao/json/events/prefer_unsigned.hpp +32 -0
  1518. data/ext/couchbase/third_party/json/include/tao/json/events/produce.hpp +120 -0
  1519. data/ext/couchbase/third_party/json/include/tao/json/events/ref.hpp +114 -0
  1520. data/ext/couchbase/third_party/json/include/tao/json/events/statistics.hpp +112 -0
  1521. data/ext/couchbase/third_party/json/include/tao/json/events/tee.hpp +386 -0
  1522. data/ext/couchbase/third_party/json/include/tao/json/events/to_pretty_stream.hpp +172 -0
  1523. data/ext/couchbase/third_party/json/include/tao/json/events/to_stream.hpp +142 -0
  1524. data/ext/couchbase/third_party/json/include/tao/json/events/to_string.hpp +39 -0
  1525. data/ext/couchbase/third_party/json/include/tao/json/events/to_value.hpp +137 -0
  1526. data/ext/couchbase/third_party/json/include/tao/json/events/transformer.hpp +70 -0
  1527. data/ext/couchbase/third_party/json/include/tao/json/events/validate_event_order.hpp +415 -0
  1528. data/ext/couchbase/third_party/json/include/tao/json/events/validate_keys.hpp +52 -0
  1529. data/ext/couchbase/third_party/json/include/tao/json/events/virtual_base.hpp +192 -0
  1530. data/ext/couchbase/third_party/json/include/tao/json/events/virtual_ref.hpp +179 -0
  1531. data/ext/couchbase/third_party/json/include/tao/json/events/virtual_wrap.hpp +166 -0
  1532. data/ext/couchbase/third_party/json/include/tao/json/events.hpp +52 -0
  1533. data/ext/couchbase/third_party/json/include/tao/json/external/double.hpp +1306 -0
  1534. data/ext/couchbase/third_party/json/include/tao/json/external/itoa.hpp +151 -0
  1535. data/ext/couchbase/third_party/json/include/tao/json/external/ryu.hpp +1216 -0
  1536. data/ext/couchbase/third_party/json/include/tao/json/forward.hpp +44 -0
  1537. data/ext/couchbase/third_party/json/include/tao/json/from_file.hpp +32 -0
  1538. data/ext/couchbase/third_party/json/include/tao/json/from_input.hpp +32 -0
  1539. data/ext/couchbase/third_party/json/include/tao/json/from_stream.hpp +45 -0
  1540. data/ext/couchbase/third_party/json/include/tao/json/from_string.hpp +41 -0
  1541. data/ext/couchbase/third_party/json/include/tao/json/internal/action.hpp +271 -0
  1542. data/ext/couchbase/third_party/json/include/tao/json/internal/base64.hpp +55 -0
  1543. data/ext/couchbase/third_party/json/include/tao/json/internal/base64url.hpp +53 -0
  1544. data/ext/couchbase/third_party/json/include/tao/json/internal/dependent_false.hpp +14 -0
  1545. data/ext/couchbase/third_party/json/include/tao/json/internal/endian.hpp +60 -0
  1546. data/ext/couchbase/third_party/json/include/tao/json/internal/endian_gcc.hpp +198 -0
  1547. data/ext/couchbase/third_party/json/include/tao/json/internal/endian_win.hpp +103 -0
  1548. data/ext/couchbase/third_party/json/include/tao/json/internal/errors.hpp +86 -0
  1549. data/ext/couchbase/third_party/json/include/tao/json/internal/escape.hpp +69 -0
  1550. data/ext/couchbase/third_party/json/include/tao/json/internal/filesystem.hpp +15 -0
  1551. data/ext/couchbase/third_party/json/include/tao/json/internal/format.hpp +59 -0
  1552. data/ext/couchbase/third_party/json/include/tao/json/internal/grammar.hpp +231 -0
  1553. data/ext/couchbase/third_party/json/include/tao/json/internal/hexdump.hpp +33 -0
  1554. data/ext/couchbase/third_party/json/include/tao/json/internal/identity.hpp +22 -0
  1555. data/ext/couchbase/third_party/json/include/tao/json/internal/number_state.hpp +81 -0
  1556. data/ext/couchbase/third_party/json/include/tao/json/internal/number_traits.hpp +267 -0
  1557. data/ext/couchbase/third_party/json/include/tao/json/internal/pair.hpp +42 -0
  1558. data/ext/couchbase/third_party/json/include/tao/json/internal/parse_util.hpp +113 -0
  1559. data/ext/couchbase/third_party/json/include/tao/json/internal/sha256.hpp +218 -0
  1560. data/ext/couchbase/third_party/json/include/tao/json/internal/single.hpp +40 -0
  1561. data/ext/couchbase/third_party/json/include/tao/json/internal/string_t.hpp +35 -0
  1562. data/ext/couchbase/third_party/json/include/tao/json/internal/type_traits.hpp +97 -0
  1563. data/ext/couchbase/third_party/json/include/tao/json/internal/unescape_action.hpp +24 -0
  1564. data/ext/couchbase/third_party/json/include/tao/json/internal/uri_fragment.hpp +182 -0
  1565. data/ext/couchbase/third_party/json/include/tao/json/jaxn/consume_file.hpp +34 -0
  1566. data/ext/couchbase/third_party/json/include/tao/json/jaxn/consume_string.hpp +32 -0
  1567. data/ext/couchbase/third_party/json/include/tao/json/jaxn/events/from_file.hpp +29 -0
  1568. data/ext/couchbase/third_party/json/include/tao/json/jaxn/events/from_input.hpp +45 -0
  1569. data/ext/couchbase/third_party/json/include/tao/json/jaxn/events/from_stream.hpp +33 -0
  1570. data/ext/couchbase/third_party/json/include/tao/json/jaxn/events/from_string.hpp +39 -0
  1571. data/ext/couchbase/third_party/json/include/tao/json/jaxn/events/to_pretty_stream.hpp +69 -0
  1572. data/ext/couchbase/third_party/json/include/tao/json/jaxn/events/to_stream.hpp +67 -0
  1573. data/ext/couchbase/third_party/json/include/tao/json/jaxn/events/to_string.hpp +39 -0
  1574. data/ext/couchbase/third_party/json/include/tao/json/jaxn/from_file.hpp +33 -0
  1575. data/ext/couchbase/third_party/json/include/tao/json/jaxn/from_input.hpp +33 -0
  1576. data/ext/couchbase/third_party/json/include/tao/json/jaxn/from_stream.hpp +48 -0
  1577. data/ext/couchbase/third_party/json/include/tao/json/jaxn/from_string.hpp +42 -0
  1578. data/ext/couchbase/third_party/json/include/tao/json/jaxn/internal/action.hpp +380 -0
  1579. data/ext/couchbase/third_party/json/include/tao/json/jaxn/internal/bunescape_action.hpp +115 -0
  1580. data/ext/couchbase/third_party/json/include/tao/json/jaxn/internal/errors.hpp +110 -0
  1581. data/ext/couchbase/third_party/json/include/tao/json/jaxn/internal/grammar.hpp +381 -0
  1582. data/ext/couchbase/third_party/json/include/tao/json/jaxn/internal/integer.hpp +255 -0
  1583. data/ext/couchbase/third_party/json/include/tao/json/jaxn/internal/unescape_action.hpp +28 -0
  1584. data/ext/couchbase/third_party/json/include/tao/json/jaxn/is_identifier.hpp +23 -0
  1585. data/ext/couchbase/third_party/json/include/tao/json/jaxn/parts_parser.hpp +261 -0
  1586. data/ext/couchbase/third_party/json/include/tao/json/jaxn/to_stream.hpp +36 -0
  1587. data/ext/couchbase/third_party/json/include/tao/json/jaxn/to_string.hpp +34 -0
  1588. data/ext/couchbase/third_party/json/include/tao/json/jaxn.hpp +19 -0
  1589. data/ext/couchbase/third_party/json/include/tao/json/message_extension.hpp +49 -0
  1590. data/ext/couchbase/third_party/json/include/tao/json/msgpack/consume_file.hpp +34 -0
  1591. data/ext/couchbase/third_party/json/include/tao/json/msgpack/consume_string.hpp +32 -0
  1592. data/ext/couchbase/third_party/json/include/tao/json/msgpack/events/from_binary.hpp +44 -0
  1593. data/ext/couchbase/third_party/json/include/tao/json/msgpack/events/from_file.hpp +27 -0
  1594. data/ext/couchbase/third_party/json/include/tao/json/msgpack/events/from_input.hpp +43 -0
  1595. data/ext/couchbase/third_party/json/include/tao/json/msgpack/events/from_string.hpp +37 -0
  1596. data/ext/couchbase/third_party/json/include/tao/json/msgpack/events/to_stream.hpp +214 -0
  1597. data/ext/couchbase/third_party/json/include/tao/json/msgpack/events/to_string.hpp +37 -0
  1598. data/ext/couchbase/third_party/json/include/tao/json/msgpack/from_binary.hpp +32 -0
  1599. data/ext/couchbase/third_party/json/include/tao/json/msgpack/from_file.hpp +33 -0
  1600. data/ext/couchbase/third_party/json/include/tao/json/msgpack/from_input.hpp +33 -0
  1601. data/ext/couchbase/third_party/json/include/tao/json/msgpack/from_string.hpp +32 -0
  1602. data/ext/couchbase/third_party/json/include/tao/json/msgpack/internal/format.hpp +57 -0
  1603. data/ext/couchbase/third_party/json/include/tao/json/msgpack/internal/grammar.hpp +230 -0
  1604. data/ext/couchbase/third_party/json/include/tao/json/msgpack/parts_parser.hpp +315 -0
  1605. data/ext/couchbase/third_party/json/include/tao/json/msgpack/to_stream.hpp +27 -0
  1606. data/ext/couchbase/third_party/json/include/tao/json/msgpack/to_string.hpp +29 -0
  1607. data/ext/couchbase/third_party/json/include/tao/json/msgpack.hpp +19 -0
  1608. data/ext/couchbase/third_party/json/include/tao/json/operators.hpp +490 -0
  1609. data/ext/couchbase/third_party/json/include/tao/json/parts_parser.hpp +333 -0
  1610. data/ext/couchbase/third_party/json/include/tao/json/pointer.hpp +433 -0
  1611. data/ext/couchbase/third_party/json/include/tao/json/produce.hpp +61 -0
  1612. data/ext/couchbase/third_party/json/include/tao/json/self_contained.hpp +130 -0
  1613. data/ext/couchbase/third_party/json/include/tao/json/span.hpp +496 -0
  1614. data/ext/couchbase/third_party/json/include/tao/json/stream.hpp +38 -0
  1615. data/ext/couchbase/third_party/json/include/tao/json/to_stream.hpp +42 -0
  1616. data/ext/couchbase/third_party/json/include/tao/json/to_string.hpp +25 -0
  1617. data/ext/couchbase/third_party/json/include/tao/json/traits.hpp +975 -0
  1618. data/ext/couchbase/third_party/json/include/tao/json/type.hpp +112 -0
  1619. data/ext/couchbase/third_party/json/include/tao/json/ubjson/consume_file.hpp +34 -0
  1620. data/ext/couchbase/third_party/json/include/tao/json/ubjson/consume_string.hpp +32 -0
  1621. data/ext/couchbase/third_party/json/include/tao/json/ubjson/events/from_binary.hpp +44 -0
  1622. data/ext/couchbase/third_party/json/include/tao/json/ubjson/events/from_file.hpp +27 -0
  1623. data/ext/couchbase/third_party/json/include/tao/json/ubjson/events/from_input.hpp +43 -0
  1624. data/ext/couchbase/third_party/json/include/tao/json/ubjson/events/from_string.hpp +37 -0
  1625. data/ext/couchbase/third_party/json/include/tao/json/ubjson/events/to_stream.hpp +174 -0
  1626. data/ext/couchbase/third_party/json/include/tao/json/ubjson/events/to_string.hpp +37 -0
  1627. data/ext/couchbase/third_party/json/include/tao/json/ubjson/from_binary.hpp +32 -0
  1628. data/ext/couchbase/third_party/json/include/tao/json/ubjson/from_file.hpp +33 -0
  1629. data/ext/couchbase/third_party/json/include/tao/json/ubjson/from_input.hpp +33 -0
  1630. data/ext/couchbase/third_party/json/include/tao/json/ubjson/from_string.hpp +32 -0
  1631. data/ext/couchbase/third_party/json/include/tao/json/ubjson/internal/grammar.hpp +415 -0
  1632. data/ext/couchbase/third_party/json/include/tao/json/ubjson/internal/marker.hpp +46 -0
  1633. data/ext/couchbase/third_party/json/include/tao/json/ubjson/parts_parser.hpp +396 -0
  1634. data/ext/couchbase/third_party/json/include/tao/json/ubjson/to_stream.hpp +28 -0
  1635. data/ext/couchbase/third_party/json/include/tao/json/ubjson/to_string.hpp +30 -0
  1636. data/ext/couchbase/third_party/json/include/tao/json/ubjson.hpp +19 -0
  1637. data/ext/couchbase/third_party/json/include/tao/json/utf8.hpp +56 -0
  1638. data/ext/couchbase/third_party/json/include/tao/json/value.hpp +12 -0
  1639. data/ext/couchbase/third_party/json/include/tao/json.hpp +45 -0
  1640. data/ext/couchbase/third_party/jsonsl/LICENSE +20 -0
  1641. data/ext/couchbase/third_party/jsonsl/jsonsl.c +3059 -0
  1642. data/ext/couchbase/third_party/jsonsl/jsonsl.h +978 -0
  1643. data/ext/couchbase/third_party/snappy/CMakeLists.txt +297 -0
  1644. data/ext/couchbase/third_party/snappy/COPYING +54 -0
  1645. data/ext/couchbase/third_party/snappy/cmake/SnappyConfig.cmake.in +33 -0
  1646. data/ext/couchbase/third_party/snappy/cmake/config.h.in +62 -0
  1647. data/ext/couchbase/third_party/snappy/snappy-c.cc +90 -0
  1648. data/ext/couchbase/third_party/snappy/snappy-c.h +138 -0
  1649. data/ext/couchbase/third_party/snappy/snappy-internal.h +231 -0
  1650. data/ext/couchbase/third_party/snappy/snappy-sinksource.cc +104 -0
  1651. data/ext/couchbase/third_party/snappy/snappy-sinksource.h +182 -0
  1652. data/ext/couchbase/third_party/snappy/snappy-stubs-internal.cc +42 -0
  1653. data/ext/couchbase/third_party/snappy/snappy-stubs-internal.h +606 -0
  1654. data/ext/couchbase/third_party/snappy/snappy-stubs-public.h.in +74 -0
  1655. data/ext/couchbase/third_party/snappy/snappy.cc +1661 -0
  1656. data/ext/couchbase/third_party/snappy/snappy.h +207 -0
  1657. data/ext/couchbase/third_party/spdlog/CMakeLists.txt +320 -0
  1658. data/ext/couchbase/third_party/spdlog/LICENSE +26 -0
  1659. data/ext/couchbase/third_party/spdlog/cmake/ide.cmake +18 -0
  1660. data/ext/couchbase/third_party/spdlog/cmake/pch.h.in +258 -0
  1661. data/ext/couchbase/third_party/spdlog/cmake/spdlog.pc.in +13 -0
  1662. data/ext/couchbase/third_party/spdlog/cmake/spdlogCPack.cmake +60 -0
  1663. data/ext/couchbase/third_party/spdlog/cmake/spdlogConfig.cmake.in +19 -0
  1664. data/ext/couchbase/third_party/spdlog/cmake/utils.cmake +62 -0
  1665. data/ext/couchbase/third_party/spdlog/cmake/version.rc.in +42 -0
  1666. data/ext/couchbase/third_party/spdlog/include/spdlog/async.h +93 -0
  1667. data/ext/couchbase/third_party/spdlog/include/spdlog/async_logger-inl.h +92 -0
  1668. data/ext/couchbase/third_party/spdlog/include/spdlog/async_logger.h +68 -0
  1669. data/ext/couchbase/third_party/spdlog/include/spdlog/cfg/argv.h +44 -0
  1670. data/ext/couchbase/third_party/spdlog/include/spdlog/cfg/env.h +38 -0
  1671. data/ext/couchbase/third_party/spdlog/include/spdlog/cfg/helpers-inl.h +120 -0
  1672. data/ext/couchbase/third_party/spdlog/include/spdlog/cfg/helpers.h +29 -0
  1673. data/ext/couchbase/third_party/spdlog/include/spdlog/common-inl.h +78 -0
  1674. data/ext/couchbase/third_party/spdlog/include/spdlog/common.h +276 -0
  1675. data/ext/couchbase/third_party/spdlog/include/spdlog/details/backtracer-inl.h +69 -0
  1676. data/ext/couchbase/third_party/spdlog/include/spdlog/details/backtracer.h +45 -0
  1677. data/ext/couchbase/third_party/spdlog/include/spdlog/details/circular_q.h +141 -0
  1678. data/ext/couchbase/third_party/spdlog/include/spdlog/details/console_globals.h +32 -0
  1679. data/ext/couchbase/third_party/spdlog/include/spdlog/details/file_helper-inl.h +147 -0
  1680. data/ext/couchbase/third_party/spdlog/include/spdlog/details/file_helper.h +59 -0
  1681. data/ext/couchbase/third_party/spdlog/include/spdlog/details/fmt_helper.h +117 -0
  1682. data/ext/couchbase/third_party/spdlog/include/spdlog/details/log_msg-inl.h +37 -0
  1683. data/ext/couchbase/third_party/spdlog/include/spdlog/details/log_msg.h +37 -0
  1684. data/ext/couchbase/third_party/spdlog/include/spdlog/details/log_msg_buffer-inl.h +58 -0
  1685. data/ext/couchbase/third_party/spdlog/include/spdlog/details/log_msg_buffer.h +33 -0
  1686. data/ext/couchbase/third_party/spdlog/include/spdlog/details/mpmc_blocking_q.h +126 -0
  1687. data/ext/couchbase/third_party/spdlog/include/spdlog/details/null_mutex.h +49 -0
  1688. data/ext/couchbase/third_party/spdlog/include/spdlog/details/os-inl.h +599 -0
  1689. data/ext/couchbase/third_party/spdlog/include/spdlog/details/os.h +118 -0
  1690. data/ext/couchbase/third_party/spdlog/include/spdlog/details/periodic_worker-inl.h +49 -0
  1691. data/ext/couchbase/third_party/spdlog/include/spdlog/details/periodic_worker.h +40 -0
  1692. data/ext/couchbase/third_party/spdlog/include/spdlog/details/registry-inl.h +313 -0
  1693. data/ext/couchbase/third_party/spdlog/include/spdlog/details/registry.h +115 -0
  1694. data/ext/couchbase/third_party/spdlog/include/spdlog/details/synchronous_factory.h +24 -0
  1695. data/ext/couchbase/third_party/spdlog/include/spdlog/details/tcp_client-windows.h +175 -0
  1696. data/ext/couchbase/third_party/spdlog/include/spdlog/details/tcp_client.h +146 -0
  1697. data/ext/couchbase/third_party/spdlog/include/spdlog/details/thread_pool-inl.h +129 -0
  1698. data/ext/couchbase/third_party/spdlog/include/spdlog/details/thread_pool.h +120 -0
  1699. data/ext/couchbase/third_party/spdlog/include/spdlog/details/windows_include.h +11 -0
  1700. data/ext/couchbase/third_party/spdlog/include/spdlog/fmt/bin_to_hex.h +217 -0
  1701. data/ext/couchbase/third_party/spdlog/include/spdlog/fmt/bundled/args.h +232 -0
  1702. data/ext/couchbase/third_party/spdlog/include/spdlog/fmt/bundled/chrono.h +1308 -0
  1703. data/ext/couchbase/third_party/spdlog/include/spdlog/fmt/bundled/color.h +627 -0
  1704. data/ext/couchbase/third_party/spdlog/include/spdlog/fmt/bundled/compile.h +639 -0
  1705. data/ext/couchbase/third_party/spdlog/include/spdlog/fmt/bundled/core.h +3002 -0
  1706. data/ext/couchbase/third_party/spdlog/include/spdlog/fmt/bundled/format-inl.h +2620 -0
  1707. data/ext/couchbase/third_party/spdlog/include/spdlog/fmt/bundled/format.h +2830 -0
  1708. data/ext/couchbase/third_party/spdlog/include/spdlog/fmt/bundled/locale.h +2 -0
  1709. data/ext/couchbase/third_party/spdlog/include/spdlog/fmt/bundled/os.h +515 -0
  1710. data/ext/couchbase/third_party/spdlog/include/spdlog/fmt/bundled/ostream.h +181 -0
  1711. data/ext/couchbase/third_party/spdlog/include/spdlog/fmt/bundled/printf.h +652 -0
  1712. data/ext/couchbase/third_party/spdlog/include/spdlog/fmt/bundled/ranges.h +468 -0
  1713. data/ext/couchbase/third_party/spdlog/include/spdlog/fmt/bundled/xchar.h +236 -0
  1714. data/ext/couchbase/third_party/spdlog/include/spdlog/fmt/chrono.h +20 -0
  1715. data/ext/couchbase/third_party/spdlog/include/spdlog/fmt/compile.h +20 -0
  1716. data/ext/couchbase/third_party/spdlog/include/spdlog/fmt/fmt.h +27 -0
  1717. data/ext/couchbase/third_party/spdlog/include/spdlog/fmt/ostr.h +20 -0
  1718. data/ext/couchbase/third_party/spdlog/include/spdlog/fmt/xchar.h +20 -0
  1719. data/ext/couchbase/third_party/spdlog/include/spdlog/formatter.h +18 -0
  1720. data/ext/couchbase/third_party/spdlog/include/spdlog/fwd.h +14 -0
  1721. data/ext/couchbase/third_party/spdlog/include/spdlog/logger-inl.h +257 -0
  1722. data/ext/couchbase/third_party/spdlog/include/spdlog/logger.h +403 -0
  1723. data/ext/couchbase/third_party/spdlog/include/spdlog/pattern_formatter-inl.h +1395 -0
  1724. data/ext/couchbase/third_party/spdlog/include/spdlog/pattern_formatter.h +126 -0
  1725. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/android_sink.h +119 -0
  1726. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/ansicolor_sink-inl.h +145 -0
  1727. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/ansicolor_sink.h +118 -0
  1728. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/base_sink-inl.h +63 -0
  1729. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/base_sink.h +52 -0
  1730. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/basic_file_sink-inl.h +43 -0
  1731. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/basic_file_sink.h +58 -0
  1732. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/daily_file_sink.h +242 -0
  1733. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/dist_sink.h +97 -0
  1734. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/dup_filter_sink.h +94 -0
  1735. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/hourly_file_sink.h +194 -0
  1736. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/mongo_sink.h +98 -0
  1737. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/msvc_sink.h +48 -0
  1738. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/null_sink.h +44 -0
  1739. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/ostream_sink.h +50 -0
  1740. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/qt_sinks.h +93 -0
  1741. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/ringbuffer_sink.h +74 -0
  1742. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/rotating_file_sink-inl.h +131 -0
  1743. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/rotating_file_sink.h +78 -0
  1744. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/sink-inl.h +25 -0
  1745. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/sink.h +35 -0
  1746. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/stdout_color_sinks-inl.h +38 -0
  1747. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/stdout_color_sinks.h +45 -0
  1748. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/stdout_sinks-inl.h +139 -0
  1749. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/stdout_sinks.h +87 -0
  1750. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/syslog_sink.h +109 -0
  1751. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/systemd_sink.h +103 -0
  1752. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/tcp_sink.h +81 -0
  1753. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/win_eventlog_sink.h +276 -0
  1754. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/wincolor_sink-inl.h +175 -0
  1755. data/ext/couchbase/third_party/spdlog/include/spdlog/sinks/wincolor_sink.h +85 -0
  1756. data/ext/couchbase/third_party/spdlog/include/spdlog/spdlog-inl.h +125 -0
  1757. data/ext/couchbase/third_party/spdlog/include/spdlog/spdlog.h +345 -0
  1758. data/ext/couchbase/third_party/spdlog/include/spdlog/stopwatch.h +61 -0
  1759. data/ext/couchbase/third_party/spdlog/include/spdlog/tweakme.h +124 -0
  1760. data/ext/couchbase/third_party/spdlog/include/spdlog/version.h +10 -0
  1761. data/ext/couchbase/third_party/spdlog/src/async.cpp +13 -0
  1762. data/ext/couchbase/third_party/spdlog/src/cfg.cpp +8 -0
  1763. data/ext/couchbase/third_party/spdlog/src/color_sinks.cpp +51 -0
  1764. data/ext/couchbase/third_party/spdlog/src/file_sinks.cpp +20 -0
  1765. data/ext/couchbase/third_party/spdlog/src/fmt.cpp +68 -0
  1766. data/ext/couchbase/third_party/spdlog/src/spdlog.cpp +26 -0
  1767. data/ext/couchbase/third_party/spdlog/src/stdout_sinks.cpp +29 -0
  1768. data/ext/couchbase.cxx +7422 -0
  1769. data/ext/ext_build_version.hxx.in +20 -0
  1770. data/ext/extconf.rb +137 -0
  1771. data/ext/revisions.rb +2 -0
  1772. data/lib/active_support/cache/couchbase_store.rb +257 -348
  1773. data/lib/couchbase/analytics_options.rb +107 -0
  1774. data/lib/couchbase/authenticator.rb +65 -0
  1775. data/lib/couchbase/binary_collection.rb +128 -0
  1776. data/lib/couchbase/binary_collection_options.rb +24 -0
  1777. data/lib/couchbase/bucket.rb +104 -417
  1778. data/lib/couchbase/cluster.rb +415 -101
  1779. data/lib/couchbase/collection.rb +563 -0
  1780. data/lib/couchbase/collection_options.rb +344 -0
  1781. data/lib/couchbase/configuration.rb +57 -0
  1782. data/lib/couchbase/datastructures/couchbase_list.rb +160 -0
  1783. data/lib/couchbase/datastructures/couchbase_map.rb +194 -0
  1784. data/lib/couchbase/datastructures/couchbase_queue.rb +134 -0
  1785. data/lib/couchbase/datastructures/couchbase_set.rb +128 -0
  1786. data/lib/couchbase/datastructures.rb +24 -0
  1787. data/lib/couchbase/diagnostics.rb +181 -0
  1788. data/lib/couchbase/errors.rb +351 -0
  1789. data/lib/couchbase/json_transcoder.rb +32 -0
  1790. data/lib/couchbase/logger.rb +42 -0
  1791. data/lib/couchbase/management/analytics_index_manager.rb +1127 -0
  1792. data/lib/couchbase/management/bucket_manager.rb +436 -0
  1793. data/lib/couchbase/management/collection_manager.rb +321 -0
  1794. data/lib/couchbase/management/query_index_manager.rb +522 -0
  1795. data/lib/couchbase/management/search_index_manager.rb +408 -0
  1796. data/lib/couchbase/management/user_manager.rb +449 -0
  1797. data/lib/couchbase/management/view_index_manager.rb +237 -0
  1798. data/lib/couchbase/management.rb +27 -0
  1799. data/lib/couchbase/mutation_state.rb +63 -0
  1800. data/lib/couchbase/options.rb +2232 -0
  1801. data/lib/couchbase/query_options.rb +120 -0
  1802. data/lib/couchbase/railtie.rb +45 -0
  1803. data/lib/couchbase/scope.rb +232 -0
  1804. data/lib/couchbase/search_options.rb +1571 -0
  1805. data/lib/couchbase/subdoc.rb +290 -0
  1806. data/lib/couchbase/utils/time.rb +56 -0
  1807. data/lib/couchbase/utils.rb +14 -55
  1808. data/lib/couchbase/version.rb +31 -15
  1809. data/lib/couchbase/view_options.rb +65 -0
  1810. data/lib/couchbase.rb +17 -152
  1811. data/lib/rails/generators/couchbase/config/config_generator.rb +27 -0
  1812. metadata +1830 -291
  1813. data/.gitignore +0 -15
  1814. data/.travis.yml +0 -22
  1815. data/.yardopts +0 -5
  1816. data/CONTRIBUTING.markdown +0 -75
  1817. data/Gemfile +0 -4
  1818. data/LICENSE +0 -201
  1819. data/Makefile +0 -3
  1820. data/README.markdown +0 -592
  1821. data/RELEASE_NOTES.markdown +0 -909
  1822. data/Rakefile +0 -20
  1823. data/couchbase.gemspec +0 -50
  1824. data/examples/chat-em/Gemfile +0 -7
  1825. data/examples/chat-em/README.markdown +0 -45
  1826. data/examples/chat-em/server.rb +0 -82
  1827. data/examples/chat-goliath-grape/Gemfile +0 -5
  1828. data/examples/chat-goliath-grape/README.markdown +0 -50
  1829. data/examples/chat-goliath-grape/app.rb +0 -67
  1830. data/examples/chat-goliath-grape/config/app.rb +0 -20
  1831. data/examples/transcoders/Gemfile +0 -3
  1832. data/examples/transcoders/README.markdown +0 -59
  1833. data/examples/transcoders/cb-zcat +0 -40
  1834. data/examples/transcoders/cb-zcp +0 -45
  1835. data/examples/transcoders/gzip_transcoder.rb +0 -49
  1836. data/examples/transcoders/options.rb +0 -54
  1837. data/ext/couchbase_ext/.gitignore +0 -4
  1838. data/ext/couchbase_ext/arguments.c +0 -979
  1839. data/ext/couchbase_ext/arithmetic.c +0 -316
  1840. data/ext/couchbase_ext/bucket.c +0 -1436
  1841. data/ext/couchbase_ext/context.c +0 -65
  1842. data/ext/couchbase_ext/couchbase_ext.c +0 -1480
  1843. data/ext/couchbase_ext/couchbase_ext.h +0 -678
  1844. data/ext/couchbase_ext/delete.c +0 -163
  1845. data/ext/couchbase_ext/eventmachine_plugin.c +0 -466
  1846. data/ext/couchbase_ext/extconf.rb +0 -194
  1847. data/ext/couchbase_ext/get.c +0 -316
  1848. data/ext/couchbase_ext/gethrtime.c +0 -129
  1849. data/ext/couchbase_ext/http.c +0 -432
  1850. data/ext/couchbase_ext/multithread_plugin.c +0 -1085
  1851. data/ext/couchbase_ext/n1ql.c +0 -117
  1852. data/ext/couchbase_ext/observe.c +0 -171
  1853. data/ext/couchbase_ext/result.c +0 -129
  1854. data/ext/couchbase_ext/stats.c +0 -163
  1855. data/ext/couchbase_ext/store.c +0 -542
  1856. data/ext/couchbase_ext/timer.c +0 -192
  1857. data/ext/couchbase_ext/touch.c +0 -186
  1858. data/ext/couchbase_ext/unlock.c +0 -176
  1859. data/ext/couchbase_ext/utils.c +0 -558
  1860. data/ext/couchbase_ext/version.c +0 -142
  1861. data/lib/action_dispatch/middleware/session/couchbase_store.rb +0 -38
  1862. data/lib/couchbase/connection_pool.rb +0 -58
  1863. data/lib/couchbase/constants.rb +0 -12
  1864. data/lib/couchbase/dns.rb +0 -76
  1865. data/lib/couchbase/result.rb +0 -26
  1866. data/lib/couchbase/transcoder.rb +0 -120
  1867. data/lib/couchbase/view.rb +0 -506
  1868. data/lib/couchbase/view_row.rb +0 -272
  1869. data/lib/ext/multi_json_fix.rb +0 -56
  1870. data/lib/rack/session/couchbase.rb +0 -108
  1871. data/tasks/benchmark.rake +0 -6
  1872. data/tasks/compile.rake +0 -153
  1873. data/tasks/test.rake +0 -100
  1874. data/tasks/util.rake +0 -21
  1875. data/test/profile/.gitignore +0 -1
  1876. data/test/profile/Gemfile +0 -6
  1877. data/test/profile/benchmark.rb +0 -195
  1878. data/test/setup.rb +0 -178
  1879. data/test/test_arithmetic.rb +0 -185
  1880. data/test/test_async.rb +0 -316
  1881. data/test/test_bucket.rb +0 -299
  1882. data/test/test_cas.rb +0 -235
  1883. data/test/test_couchbase.rb +0 -77
  1884. data/test/test_couchbase_connection_pool.rb +0 -77
  1885. data/test/test_couchbase_rails_cache_store.rb +0 -358
  1886. data/test/test_delete.rb +0 -120
  1887. data/test/test_errors.rb +0 -82
  1888. data/test/test_eventmachine.rb +0 -78
  1889. data/test/test_format.rb +0 -164
  1890. data/test/test_get.rb +0 -407
  1891. data/test/test_stats.rb +0 -57
  1892. data/test/test_store.rb +0 -224
  1893. data/test/test_timer.rb +0 -42
  1894. data/test/test_touch.rb +0 -97
  1895. data/test/test_unlock.rb +0 -119
  1896. data/test/test_utils.rb +0 -58
  1897. data/test/test_version.rb +0 -52
@@ -0,0 +1,3002 @@
1
+ // Formatting library for C++ - the core API for char/UTF-8
2
+ //
3
+ // Copyright (c) 2012 - present, Victor Zverovich
4
+ // All rights reserved.
5
+ //
6
+ // For the license information refer to format.h.
7
+
8
+ #ifndef FMT_CORE_H_
9
+ #define FMT_CORE_H_
10
+
11
+ #include <cstdio> // std::FILE
12
+ #include <cstring>
13
+ #include <iterator>
14
+ #include <limits>
15
+ #include <string>
16
+ #include <type_traits>
17
+
18
+ // The fmt library version in the form major * 10000 + minor * 100 + patch.
19
+ #define FMT_VERSION 80001
20
+
21
+ #ifdef __clang__
22
+ # define FMT_CLANG_VERSION (__clang_major__ * 100 + __clang_minor__)
23
+ #else
24
+ # define FMT_CLANG_VERSION 0
25
+ #endif
26
+
27
+ #if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)
28
+ # define FMT_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
29
+ # define FMT_GCC_PRAGMA(arg) _Pragma(arg)
30
+ #else
31
+ # define FMT_GCC_VERSION 0
32
+ # define FMT_GCC_PRAGMA(arg)
33
+ #endif
34
+
35
+ #if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
36
+ # define FMT_HAS_GXX_CXX11 FMT_GCC_VERSION
37
+ #else
38
+ # define FMT_HAS_GXX_CXX11 0
39
+ #endif
40
+
41
+ #if defined(__INTEL_COMPILER)
42
+ # define FMT_ICC_VERSION __INTEL_COMPILER
43
+ #else
44
+ # define FMT_ICC_VERSION 0
45
+ #endif
46
+
47
+ #ifdef __NVCC__
48
+ # define FMT_NVCC __NVCC__
49
+ #else
50
+ # define FMT_NVCC 0
51
+ #endif
52
+
53
+ #ifdef _MSC_VER
54
+ # define FMT_MSC_VER _MSC_VER
55
+ # define FMT_MSC_WARNING(...) __pragma(warning(__VA_ARGS__))
56
+ #else
57
+ # define FMT_MSC_VER 0
58
+ # define FMT_MSC_WARNING(...)
59
+ #endif
60
+
61
+ #ifdef __has_feature
62
+ # define FMT_HAS_FEATURE(x) __has_feature(x)
63
+ #else
64
+ # define FMT_HAS_FEATURE(x) 0
65
+ #endif
66
+
67
+ #if defined(__has_include) && \
68
+ (!defined(__INTELLISENSE__) || FMT_MSC_VER > 1900) && \
69
+ (!FMT_ICC_VERSION || FMT_ICC_VERSION >= 1600)
70
+ # define FMT_HAS_INCLUDE(x) __has_include(x)
71
+ #else
72
+ # define FMT_HAS_INCLUDE(x) 0
73
+ #endif
74
+
75
+ #ifdef __has_cpp_attribute
76
+ # define FMT_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x)
77
+ #else
78
+ # define FMT_HAS_CPP_ATTRIBUTE(x) 0
79
+ #endif
80
+
81
+ #define FMT_HAS_CPP14_ATTRIBUTE(attribute) \
82
+ (__cplusplus >= 201402L && FMT_HAS_CPP_ATTRIBUTE(attribute))
83
+
84
+ #define FMT_HAS_CPP17_ATTRIBUTE(attribute) \
85
+ (__cplusplus >= 201703L && FMT_HAS_CPP_ATTRIBUTE(attribute))
86
+
87
+ // Check if relaxed C++14 constexpr is supported.
88
+ // GCC doesn't allow throw in constexpr until version 6 (bug 67371).
89
+ #ifndef FMT_USE_CONSTEXPR
90
+ # define FMT_USE_CONSTEXPR \
91
+ (FMT_HAS_FEATURE(cxx_relaxed_constexpr) || FMT_MSC_VER >= 1910 || \
92
+ (FMT_GCC_VERSION >= 600 && __cplusplus >= 201402L)) && \
93
+ !FMT_NVCC && !FMT_ICC_VERSION
94
+ #endif
95
+ #if FMT_USE_CONSTEXPR
96
+ # define FMT_CONSTEXPR constexpr
97
+ # define FMT_CONSTEXPR_DECL constexpr
98
+ #else
99
+ # define FMT_CONSTEXPR
100
+ # define FMT_CONSTEXPR_DECL
101
+ #endif
102
+
103
+ // Check if constexpr std::char_traits<>::compare,length is supported.
104
+ #if defined(__GLIBCXX__)
105
+ # if __cplusplus >= 201703L && defined(_GLIBCXX_RELEASE) && \
106
+ _GLIBCXX_RELEASE >= 7 // GCC 7+ libstdc++ has _GLIBCXX_RELEASE.
107
+ # define FMT_CONSTEXPR_CHAR_TRAITS constexpr
108
+ # endif
109
+ #elif defined(_LIBCPP_VERSION) && __cplusplus >= 201703L && \
110
+ _LIBCPP_VERSION >= 4000
111
+ # define FMT_CONSTEXPR_CHAR_TRAITS constexpr
112
+ #elif FMT_MSC_VER >= 1914 && _MSVC_LANG >= 201703L
113
+ # define FMT_CONSTEXPR_CHAR_TRAITS constexpr
114
+ #endif
115
+ #ifndef FMT_CONSTEXPR_CHAR_TRAITS
116
+ # define FMT_CONSTEXPR_CHAR_TRAITS
117
+ #endif
118
+
119
+ #ifndef FMT_OVERRIDE
120
+ # if FMT_HAS_FEATURE(cxx_override_control) || \
121
+ (FMT_GCC_VERSION >= 408 && FMT_HAS_GXX_CXX11) || FMT_MSC_VER >= 1900
122
+ # define FMT_OVERRIDE override
123
+ # else
124
+ # define FMT_OVERRIDE
125
+ # endif
126
+ #endif
127
+
128
+ // Check if exceptions are disabled.
129
+ #ifndef FMT_EXCEPTIONS
130
+ # if (defined(__GNUC__) && !defined(__EXCEPTIONS)) || \
131
+ FMT_MSC_VER && !_HAS_EXCEPTIONS
132
+ # define FMT_EXCEPTIONS 0
133
+ # else
134
+ # define FMT_EXCEPTIONS 1
135
+ # endif
136
+ #endif
137
+
138
+ // Define FMT_USE_NOEXCEPT to make fmt use noexcept (C++11 feature).
139
+ #ifndef FMT_USE_NOEXCEPT
140
+ # define FMT_USE_NOEXCEPT 0
141
+ #endif
142
+
143
+ #if FMT_USE_NOEXCEPT || FMT_HAS_FEATURE(cxx_noexcept) || \
144
+ (FMT_GCC_VERSION >= 408 && FMT_HAS_GXX_CXX11) || FMT_MSC_VER >= 1900
145
+ # define FMT_DETECTED_NOEXCEPT noexcept
146
+ # define FMT_HAS_CXX11_NOEXCEPT 1
147
+ #else
148
+ # define FMT_DETECTED_NOEXCEPT throw()
149
+ # define FMT_HAS_CXX11_NOEXCEPT 0
150
+ #endif
151
+
152
+ #ifndef FMT_NOEXCEPT
153
+ # if FMT_EXCEPTIONS || FMT_HAS_CXX11_NOEXCEPT
154
+ # define FMT_NOEXCEPT FMT_DETECTED_NOEXCEPT
155
+ # else
156
+ # define FMT_NOEXCEPT
157
+ # endif
158
+ #endif
159
+
160
+ // [[noreturn]] is disabled on MSVC and NVCC because of bogus unreachable code
161
+ // warnings.
162
+ #if FMT_EXCEPTIONS && FMT_HAS_CPP_ATTRIBUTE(noreturn) && !FMT_MSC_VER && \
163
+ !FMT_NVCC
164
+ # define FMT_NORETURN [[noreturn]]
165
+ #else
166
+ # define FMT_NORETURN
167
+ #endif
168
+
169
+ #ifndef FMT_MAYBE_UNUSED
170
+ # if FMT_HAS_CPP17_ATTRIBUTE(maybe_unused)
171
+ # define FMT_MAYBE_UNUSED [[maybe_unused]]
172
+ # else
173
+ # define FMT_MAYBE_UNUSED
174
+ # endif
175
+ #endif
176
+
177
+ #if __cplusplus == 201103L || __cplusplus == 201402L
178
+ # if defined(__INTEL_COMPILER) || defined(__PGI)
179
+ # define FMT_FALLTHROUGH
180
+ # elif defined(__clang__)
181
+ # define FMT_FALLTHROUGH [[clang::fallthrough]]
182
+ # elif FMT_GCC_VERSION >= 700 && \
183
+ (!defined(__EDG_VERSION__) || __EDG_VERSION__ >= 520)
184
+ # define FMT_FALLTHROUGH [[gnu::fallthrough]]
185
+ # else
186
+ # define FMT_FALLTHROUGH
187
+ # endif
188
+ #elif FMT_HAS_CPP17_ATTRIBUTE(fallthrough) || \
189
+ (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
190
+ # define FMT_FALLTHROUGH [[fallthrough]]
191
+ #else
192
+ # define FMT_FALLTHROUGH
193
+ #endif
194
+
195
+ #ifndef FMT_USE_FLOAT
196
+ # define FMT_USE_FLOAT 1
197
+ #endif
198
+ #ifndef FMT_USE_DOUBLE
199
+ # define FMT_USE_DOUBLE 1
200
+ #endif
201
+ #ifndef FMT_USE_LONG_DOUBLE
202
+ # define FMT_USE_LONG_DOUBLE 1
203
+ #endif
204
+
205
+ #ifndef FMT_INLINE
206
+ # if FMT_GCC_VERSION || FMT_CLANG_VERSION
207
+ # define FMT_INLINE inline __attribute__((always_inline))
208
+ # else
209
+ # define FMT_INLINE inline
210
+ # endif
211
+ #endif
212
+
213
+ #ifndef FMT_USE_INLINE_NAMESPACES
214
+ # if FMT_HAS_FEATURE(cxx_inline_namespaces) || FMT_GCC_VERSION >= 404 || \
215
+ (FMT_MSC_VER >= 1900 && (!defined(_MANAGED) || !_MANAGED))
216
+ # define FMT_USE_INLINE_NAMESPACES 1
217
+ # else
218
+ # define FMT_USE_INLINE_NAMESPACES 0
219
+ # endif
220
+ #endif
221
+
222
+ #ifndef FMT_BEGIN_NAMESPACE
223
+ # if FMT_USE_INLINE_NAMESPACES
224
+ # define FMT_INLINE_NAMESPACE inline namespace
225
+ # define FMT_END_NAMESPACE \
226
+ } \
227
+ }
228
+ # else
229
+ # define FMT_INLINE_NAMESPACE namespace
230
+ # define FMT_END_NAMESPACE \
231
+ } \
232
+ using namespace v8; \
233
+ }
234
+ # endif
235
+ # define FMT_BEGIN_NAMESPACE \
236
+ namespace fmt { \
237
+ FMT_INLINE_NAMESPACE v8 {
238
+ #endif
239
+
240
+ #ifndef FMT_MODULE_EXPORT
241
+ # define FMT_MODULE_EXPORT
242
+ # define FMT_MODULE_EXPORT_BEGIN
243
+ # define FMT_MODULE_EXPORT_END
244
+ # define FMT_BEGIN_DETAIL_NAMESPACE namespace detail {
245
+ # define FMT_END_DETAIL_NAMESPACE }
246
+ #endif
247
+
248
+ #if !defined(FMT_HEADER_ONLY) && defined(_WIN32)
249
+ # define FMT_CLASS_API FMT_MSC_WARNING(suppress : 4275)
250
+ # ifdef FMT_EXPORT
251
+ # define FMT_API __declspec(dllexport)
252
+ # elif defined(FMT_SHARED)
253
+ # define FMT_API __declspec(dllimport)
254
+ # endif
255
+ #else
256
+ # define FMT_CLASS_API
257
+ # if defined(FMT_EXPORT) || defined(FMT_SHARED)
258
+ # if defined(__GNUC__) || defined(__clang__)
259
+ # define FMT_API __attribute__((visibility("default")))
260
+ # endif
261
+ # endif
262
+ #endif
263
+ #ifndef FMT_API
264
+ # define FMT_API
265
+ #endif
266
+
267
+ #if FMT_GCC_VERSION
268
+ # define FMT_GCC_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
269
+ #else
270
+ # define FMT_GCC_VISIBILITY_HIDDEN
271
+ #endif
272
+
273
+ // libc++ supports string_view in pre-c++17.
274
+ #if (FMT_HAS_INCLUDE(<string_view>) && \
275
+ (__cplusplus > 201402L || defined(_LIBCPP_VERSION))) || \
276
+ (defined(_MSVC_LANG) && _MSVC_LANG > 201402L && _MSC_VER >= 1910)
277
+ # include <string_view>
278
+ # define FMT_USE_STRING_VIEW
279
+ #elif FMT_HAS_INCLUDE("experimental/string_view") && __cplusplus >= 201402L
280
+ # include <experimental/string_view>
281
+ # define FMT_USE_EXPERIMENTAL_STRING_VIEW
282
+ #endif
283
+
284
+ #ifndef FMT_UNICODE
285
+ # define FMT_UNICODE !FMT_MSC_VER
286
+ #endif
287
+
288
+ #ifndef FMT_CONSTEVAL
289
+ # if ((FMT_GCC_VERSION >= 1000 || FMT_CLANG_VERSION >= 1101) && \
290
+ __cplusplus > 201703L) || \
291
+ (defined(__cpp_consteval) && \
292
+ !FMT_MSC_VER) // consteval is broken in MSVC.
293
+ # define FMT_CONSTEVAL consteval
294
+ # define FMT_HAS_CONSTEVAL
295
+ # else
296
+ # define FMT_CONSTEVAL
297
+ # endif
298
+ #endif
299
+
300
+ #ifndef FMT_USE_NONTYPE_TEMPLATE_PARAMETERS
301
+ # if defined(__cpp_nontype_template_args) && \
302
+ ((FMT_GCC_VERSION >= 903 && __cplusplus >= 201709L) || \
303
+ __cpp_nontype_template_args >= 201911L)
304
+ # define FMT_USE_NONTYPE_TEMPLATE_PARAMETERS 1
305
+ # else
306
+ # define FMT_USE_NONTYPE_TEMPLATE_PARAMETERS 0
307
+ # endif
308
+ #endif
309
+
310
+ // Enable minimal optimizations for more compact code in debug mode.
311
+ FMT_GCC_PRAGMA("GCC push_options")
312
+ #ifndef __OPTIMIZE__
313
+ FMT_GCC_PRAGMA("GCC optimize(\"Og\")")
314
+ #endif
315
+
316
+ FMT_BEGIN_NAMESPACE
317
+ FMT_MODULE_EXPORT_BEGIN
318
+
319
+ // Implementations of enable_if_t and other metafunctions for older systems.
320
+ template <bool B, typename T = void>
321
+ using enable_if_t = typename std::enable_if<B, T>::type;
322
+ template <bool B, typename T, typename F>
323
+ using conditional_t = typename std::conditional<B, T, F>::type;
324
+ template <bool B> using bool_constant = std::integral_constant<bool, B>;
325
+ template <typename T>
326
+ using remove_reference_t = typename std::remove_reference<T>::type;
327
+ template <typename T>
328
+ using remove_cvref_t = typename std::remove_cv<remove_reference_t<T>>::type;
329
+ template <typename T> struct type_identity { using type = T; };
330
+ template <typename T> using type_identity_t = typename type_identity<T>::type;
331
+
332
+ struct monostate {
333
+ constexpr monostate() {}
334
+ };
335
+
336
+ // Suppress "unused variable" warnings with the method described in
337
+ // https://herbsutter.com/2009/10/18/mailbag-shutting-up-compiler-warnings/.
338
+ // (void)var does not work on many Intel compilers.
339
+ template <typename... T> FMT_CONSTEXPR void ignore_unused(const T&...) {}
340
+
341
+ // An enable_if helper to be used in template parameters which results in much
342
+ // shorter symbols: https://godbolt.org/z/sWw4vP. Extra parentheses are needed
343
+ // to workaround a bug in MSVC 2019 (see #1140 and #1186).
344
+ #ifdef FMT_DOC
345
+ # define FMT_ENABLE_IF(...)
346
+ #else
347
+ # define FMT_ENABLE_IF(...) enable_if_t<(__VA_ARGS__), int> = 0
348
+ #endif
349
+
350
+ FMT_BEGIN_DETAIL_NAMESPACE
351
+
352
+ constexpr FMT_INLINE auto is_constant_evaluated() FMT_NOEXCEPT -> bool {
353
+ #ifdef __cpp_lib_is_constant_evaluated
354
+ return std::is_constant_evaluated();
355
+ #else
356
+ return false;
357
+ #endif
358
+ }
359
+
360
+ // A function to suppress "conditional expression is constant" warnings.
361
+ template <typename T> constexpr auto const_check(T value) -> T { return value; }
362
+
363
+ FMT_NORETURN FMT_API void assert_fail(const char* file, int line,
364
+ const char* message);
365
+
366
+ #ifndef FMT_ASSERT
367
+ # ifdef NDEBUG
368
+ // FMT_ASSERT is not empty to avoid -Werror=empty-body.
369
+ # define FMT_ASSERT(condition, message) \
370
+ ::fmt::ignore_unused((condition), (message))
371
+ # else
372
+ # define FMT_ASSERT(condition, message) \
373
+ ((condition) /* void() fails with -Winvalid-constexpr on clang 4.0.1 */ \
374
+ ? (void)0 \
375
+ : ::fmt::detail::assert_fail(__FILE__, __LINE__, (message)))
376
+ # endif
377
+ #endif
378
+
379
+ #if defined(FMT_USE_STRING_VIEW)
380
+ template <typename Char> using std_string_view = std::basic_string_view<Char>;
381
+ #elif defined(FMT_USE_EXPERIMENTAL_STRING_VIEW)
382
+ template <typename Char>
383
+ using std_string_view = std::experimental::basic_string_view<Char>;
384
+ #else
385
+ template <typename T> struct std_string_view {};
386
+ #endif
387
+
388
+ #ifdef FMT_USE_INT128
389
+ // Do nothing.
390
+ #elif defined(__SIZEOF_INT128__) && !FMT_NVCC && \
391
+ !(FMT_CLANG_VERSION && FMT_MSC_VER)
392
+ # define FMT_USE_INT128 1
393
+ using int128_t = __int128_t;
394
+ using uint128_t = __uint128_t;
395
+ template <typename T> inline auto convert_for_visit(T value) -> T {
396
+ return value;
397
+ }
398
+ #else
399
+ # define FMT_USE_INT128 0
400
+ #endif
401
+ #if !FMT_USE_INT128
402
+ enum class int128_t {};
403
+ enum class uint128_t {};
404
+ // Reduce template instantiations.
405
+ template <typename T> inline auto convert_for_visit(T) -> monostate {
406
+ return {};
407
+ }
408
+ #endif
409
+
410
+ // Casts a nonnegative integer to unsigned.
411
+ template <typename Int>
412
+ FMT_CONSTEXPR auto to_unsigned(Int value) ->
413
+ typename std::make_unsigned<Int>::type {
414
+ FMT_ASSERT(value >= 0, "negative value");
415
+ return static_cast<typename std::make_unsigned<Int>::type>(value);
416
+ }
417
+
418
+ FMT_MSC_WARNING(suppress : 4566) constexpr unsigned char micro[] = "\u00B5";
419
+
420
+ constexpr auto is_utf8() -> bool {
421
+ // Avoid buggy sign extensions in MSVC's constant evaluation mode.
422
+ // https://developercommunity.visualstudio.com/t/C-difference-in-behavior-for-unsigned/1233612
423
+ using uchar = unsigned char;
424
+ return FMT_UNICODE || (sizeof(micro) == 3 && uchar(micro[0]) == 0xC2 &&
425
+ uchar(micro[1]) == 0xB5);
426
+ }
427
+ FMT_END_DETAIL_NAMESPACE
428
+
429
+ /**
430
+ An implementation of ``std::basic_string_view`` for pre-C++17. It provides a
431
+ subset of the API. ``fmt::basic_string_view`` is used for format strings even
432
+ if ``std::string_view`` is available to prevent issues when a library is
433
+ compiled with a different ``-std`` option than the client code (which is not
434
+ recommended).
435
+ */
436
+ template <typename Char> class basic_string_view {
437
+ private:
438
+ const Char* data_;
439
+ size_t size_;
440
+
441
+ public:
442
+ using value_type = Char;
443
+ using iterator = const Char*;
444
+
445
+ constexpr basic_string_view() FMT_NOEXCEPT : data_(nullptr), size_(0) {}
446
+
447
+ /** Constructs a string reference object from a C string and a size. */
448
+ constexpr basic_string_view(const Char* s, size_t count) FMT_NOEXCEPT
449
+ : data_(s),
450
+ size_(count) {}
451
+
452
+ /**
453
+ \rst
454
+ Constructs a string reference object from a C string computing
455
+ the size with ``std::char_traits<Char>::length``.
456
+ \endrst
457
+ */
458
+ FMT_CONSTEXPR_CHAR_TRAITS
459
+ FMT_INLINE
460
+ basic_string_view(const Char* s) : data_(s) {
461
+ if (detail::const_check(std::is_same<Char, char>::value &&
462
+ !detail::is_constant_evaluated()))
463
+ size_ = std::strlen(reinterpret_cast<const char*>(s));
464
+ else
465
+ size_ = std::char_traits<Char>::length(s);
466
+ }
467
+
468
+ /** Constructs a string reference from a ``std::basic_string`` object. */
469
+ template <typename Traits, typename Alloc>
470
+ FMT_CONSTEXPR basic_string_view(
471
+ const std::basic_string<Char, Traits, Alloc>& s) FMT_NOEXCEPT
472
+ : data_(s.data()),
473
+ size_(s.size()) {}
474
+
475
+ template <typename S, FMT_ENABLE_IF(std::is_same<
476
+ S, detail::std_string_view<Char>>::value)>
477
+ FMT_CONSTEXPR basic_string_view(S s) FMT_NOEXCEPT : data_(s.data()),
478
+ size_(s.size()) {}
479
+
480
+ /** Returns a pointer to the string data. */
481
+ constexpr auto data() const -> const Char* { return data_; }
482
+
483
+ /** Returns the string size. */
484
+ constexpr auto size() const -> size_t { return size_; }
485
+
486
+ constexpr auto begin() const -> iterator { return data_; }
487
+ constexpr auto end() const -> iterator { return data_ + size_; }
488
+
489
+ constexpr auto operator[](size_t pos) const -> const Char& {
490
+ return data_[pos];
491
+ }
492
+
493
+ FMT_CONSTEXPR void remove_prefix(size_t n) {
494
+ data_ += n;
495
+ size_ -= n;
496
+ }
497
+
498
+ // Lexicographically compare this string reference to other.
499
+ FMT_CONSTEXPR_CHAR_TRAITS auto compare(basic_string_view other) const -> int {
500
+ size_t str_size = size_ < other.size_ ? size_ : other.size_;
501
+ int result = std::char_traits<Char>::compare(data_, other.data_, str_size);
502
+ if (result == 0)
503
+ result = size_ == other.size_ ? 0 : (size_ < other.size_ ? -1 : 1);
504
+ return result;
505
+ }
506
+
507
+ FMT_CONSTEXPR_CHAR_TRAITS friend auto operator==(basic_string_view lhs,
508
+ basic_string_view rhs)
509
+ -> bool {
510
+ return lhs.compare(rhs) == 0;
511
+ }
512
+ friend auto operator!=(basic_string_view lhs, basic_string_view rhs) -> bool {
513
+ return lhs.compare(rhs) != 0;
514
+ }
515
+ friend auto operator<(basic_string_view lhs, basic_string_view rhs) -> bool {
516
+ return lhs.compare(rhs) < 0;
517
+ }
518
+ friend auto operator<=(basic_string_view lhs, basic_string_view rhs) -> bool {
519
+ return lhs.compare(rhs) <= 0;
520
+ }
521
+ friend auto operator>(basic_string_view lhs, basic_string_view rhs) -> bool {
522
+ return lhs.compare(rhs) > 0;
523
+ }
524
+ friend auto operator>=(basic_string_view lhs, basic_string_view rhs) -> bool {
525
+ return lhs.compare(rhs) >= 0;
526
+ }
527
+ };
528
+
529
+ using string_view = basic_string_view<char>;
530
+
531
+ /** Specifies if ``T`` is a character type. Can be specialized by users. */
532
+ template <typename T> struct is_char : std::false_type {};
533
+ template <> struct is_char<char> : std::true_type {};
534
+
535
+ // Returns a string view of `s`.
536
+ template <typename Char, FMT_ENABLE_IF(is_char<Char>::value)>
537
+ FMT_INLINE auto to_string_view(const Char* s) -> basic_string_view<Char> {
538
+ return s;
539
+ }
540
+ template <typename Char, typename Traits, typename Alloc>
541
+ inline auto to_string_view(const std::basic_string<Char, Traits, Alloc>& s)
542
+ -> basic_string_view<Char> {
543
+ return s;
544
+ }
545
+ template <typename Char>
546
+ constexpr auto to_string_view(basic_string_view<Char> s)
547
+ -> basic_string_view<Char> {
548
+ return s;
549
+ }
550
+ template <typename Char,
551
+ FMT_ENABLE_IF(!std::is_empty<detail::std_string_view<Char>>::value)>
552
+ inline auto to_string_view(detail::std_string_view<Char> s)
553
+ -> basic_string_view<Char> {
554
+ return s;
555
+ }
556
+
557
+ // A base class for compile-time strings. It is defined in the fmt namespace to
558
+ // make formatting functions visible via ADL, e.g. format(FMT_STRING("{}"), 42).
559
+ struct compile_string {};
560
+
561
+ template <typename S>
562
+ struct is_compile_string : std::is_base_of<compile_string, S> {};
563
+
564
+ template <typename S, FMT_ENABLE_IF(is_compile_string<S>::value)>
565
+ constexpr auto to_string_view(const S& s)
566
+ -> basic_string_view<typename S::char_type> {
567
+ return basic_string_view<typename S::char_type>(s);
568
+ }
569
+
570
+ FMT_BEGIN_DETAIL_NAMESPACE
571
+
572
+ void to_string_view(...);
573
+ using fmt::v8::to_string_view;
574
+
575
+ // Specifies whether S is a string type convertible to fmt::basic_string_view.
576
+ // It should be a constexpr function but MSVC 2017 fails to compile it in
577
+ // enable_if and MSVC 2015 fails to compile it as an alias template.
578
+ template <typename S>
579
+ struct is_string : std::is_class<decltype(to_string_view(std::declval<S>()))> {
580
+ };
581
+
582
+ template <typename S, typename = void> struct char_t_impl {};
583
+ template <typename S> struct char_t_impl<S, enable_if_t<is_string<S>::value>> {
584
+ using result = decltype(to_string_view(std::declval<S>()));
585
+ using type = typename result::value_type;
586
+ };
587
+
588
+ // Reports a compile-time error if S is not a valid format string.
589
+ template <typename..., typename S, FMT_ENABLE_IF(!is_compile_string<S>::value)>
590
+ FMT_INLINE void check_format_string(const S&) {
591
+ #ifdef FMT_ENFORCE_COMPILE_STRING
592
+ static_assert(is_compile_string<S>::value,
593
+ "FMT_ENFORCE_COMPILE_STRING requires all format strings to use "
594
+ "FMT_STRING.");
595
+ #endif
596
+ }
597
+ template <typename..., typename S, FMT_ENABLE_IF(is_compile_string<S>::value)>
598
+ void check_format_string(S);
599
+
600
+ struct error_handler {
601
+ constexpr error_handler() = default;
602
+ constexpr error_handler(const error_handler&) = default;
603
+
604
+ // This function is intentionally not constexpr to give a compile-time error.
605
+ FMT_NORETURN FMT_API void on_error(const char* message);
606
+ };
607
+ FMT_END_DETAIL_NAMESPACE
608
+
609
+ /** String's character type. */
610
+ template <typename S> using char_t = typename detail::char_t_impl<S>::type;
611
+
612
+ /**
613
+ \rst
614
+ Parsing context consisting of a format string range being parsed and an
615
+ argument counter for automatic indexing.
616
+ You can use the ``format_parse_context`` type alias for ``char`` instead.
617
+ \endrst
618
+ */
619
+ template <typename Char, typename ErrorHandler = detail::error_handler>
620
+ class basic_format_parse_context : private ErrorHandler {
621
+ private:
622
+ basic_string_view<Char> format_str_;
623
+ int next_arg_id_;
624
+
625
+ public:
626
+ using char_type = Char;
627
+ using iterator = typename basic_string_view<Char>::iterator;
628
+
629
+ explicit constexpr basic_format_parse_context(
630
+ basic_string_view<Char> format_str, ErrorHandler eh = {},
631
+ int next_arg_id = 0)
632
+ : ErrorHandler(eh), format_str_(format_str), next_arg_id_(next_arg_id) {}
633
+
634
+ /**
635
+ Returns an iterator to the beginning of the format string range being
636
+ parsed.
637
+ */
638
+ constexpr auto begin() const FMT_NOEXCEPT -> iterator {
639
+ return format_str_.begin();
640
+ }
641
+
642
+ /**
643
+ Returns an iterator past the end of the format string range being parsed.
644
+ */
645
+ constexpr auto end() const FMT_NOEXCEPT -> iterator {
646
+ return format_str_.end();
647
+ }
648
+
649
+ /** Advances the begin iterator to ``it``. */
650
+ FMT_CONSTEXPR void advance_to(iterator it) {
651
+ format_str_.remove_prefix(detail::to_unsigned(it - begin()));
652
+ }
653
+
654
+ /**
655
+ Reports an error if using the manual argument indexing; otherwise returns
656
+ the next argument index and switches to the automatic indexing.
657
+ */
658
+ FMT_CONSTEXPR auto next_arg_id() -> int {
659
+ // Don't check if the argument id is valid to avoid overhead and because it
660
+ // will be checked during formatting anyway.
661
+ if (next_arg_id_ >= 0) return next_arg_id_++;
662
+ on_error("cannot switch from manual to automatic argument indexing");
663
+ return 0;
664
+ }
665
+
666
+ /**
667
+ Reports an error if using the automatic argument indexing; otherwise
668
+ switches to the manual indexing.
669
+ */
670
+ FMT_CONSTEXPR void check_arg_id(int) {
671
+ if (next_arg_id_ > 0)
672
+ on_error("cannot switch from automatic to manual argument indexing");
673
+ else
674
+ next_arg_id_ = -1;
675
+ }
676
+
677
+ FMT_CONSTEXPR void check_arg_id(basic_string_view<Char>) {}
678
+
679
+ FMT_CONSTEXPR void on_error(const char* message) {
680
+ ErrorHandler::on_error(message);
681
+ }
682
+
683
+ constexpr auto error_handler() const -> ErrorHandler { return *this; }
684
+ };
685
+
686
+ using format_parse_context = basic_format_parse_context<char>;
687
+
688
+ template <typename Context> class basic_format_arg;
689
+ template <typename Context> class basic_format_args;
690
+ template <typename Context> class dynamic_format_arg_store;
691
+
692
+ // A formatter for objects of type T.
693
+ template <typename T, typename Char = char, typename Enable = void>
694
+ struct formatter {
695
+ // A deleted default constructor indicates a disabled formatter.
696
+ formatter() = delete;
697
+ };
698
+
699
+ // Specifies if T has an enabled formatter specialization. A type can be
700
+ // formattable even if it doesn't have a formatter e.g. via a conversion.
701
+ template <typename T, typename Context>
702
+ using has_formatter =
703
+ std::is_constructible<typename Context::template formatter_type<T>>;
704
+
705
+ // Checks whether T is a container with contiguous storage.
706
+ template <typename T> struct is_contiguous : std::false_type {};
707
+ template <typename Char>
708
+ struct is_contiguous<std::basic_string<Char>> : std::true_type {};
709
+
710
+ class appender;
711
+
712
+ FMT_BEGIN_DETAIL_NAMESPACE
713
+
714
+ // Extracts a reference to the container from back_insert_iterator.
715
+ template <typename Container>
716
+ inline auto get_container(std::back_insert_iterator<Container> it)
717
+ -> Container& {
718
+ using bi_iterator = std::back_insert_iterator<Container>;
719
+ struct accessor : bi_iterator {
720
+ accessor(bi_iterator iter) : bi_iterator(iter) {}
721
+ using bi_iterator::container;
722
+ };
723
+ return *accessor(it).container;
724
+ }
725
+
726
+ template <typename Char, typename InputIt, typename OutputIt>
727
+ FMT_CONSTEXPR auto copy_str(InputIt begin, InputIt end, OutputIt out)
728
+ -> OutputIt {
729
+ while (begin != end) *out++ = static_cast<Char>(*begin++);
730
+ return out;
731
+ }
732
+
733
+ template <typename Char, FMT_ENABLE_IF(std::is_same<Char, char>::value)>
734
+ FMT_CONSTEXPR auto copy_str(const Char* begin, const Char* end, Char* out)
735
+ -> Char* {
736
+ if (is_constant_evaluated())
737
+ return copy_str<Char, const Char*, Char*>(begin, end, out);
738
+ auto size = to_unsigned(end - begin);
739
+ memcpy(out, begin, size);
740
+ return out + size;
741
+ }
742
+
743
+ /**
744
+ \rst
745
+ A contiguous memory buffer with an optional growing ability. It is an internal
746
+ class and shouldn't be used directly, only via `~fmt::basic_memory_buffer`.
747
+ \endrst
748
+ */
749
+ template <typename T> class buffer {
750
+ private:
751
+ T* ptr_;
752
+ size_t size_;
753
+ size_t capacity_;
754
+
755
+ protected:
756
+ // Don't initialize ptr_ since it is not accessed to save a few cycles.
757
+ FMT_MSC_WARNING(suppress : 26495)
758
+ buffer(size_t sz) FMT_NOEXCEPT : size_(sz), capacity_(sz) {}
759
+
760
+ buffer(T* p = nullptr, size_t sz = 0, size_t cap = 0) FMT_NOEXCEPT
761
+ : ptr_(p),
762
+ size_(sz),
763
+ capacity_(cap) {}
764
+
765
+ ~buffer() = default;
766
+ buffer(buffer&&) = default;
767
+
768
+ /** Sets the buffer data and capacity. */
769
+ void set(T* buf_data, size_t buf_capacity) FMT_NOEXCEPT {
770
+ ptr_ = buf_data;
771
+ capacity_ = buf_capacity;
772
+ }
773
+
774
+ /** Increases the buffer capacity to hold at least *capacity* elements. */
775
+ virtual void grow(size_t capacity) = 0;
776
+
777
+ public:
778
+ using value_type = T;
779
+ using const_reference = const T&;
780
+
781
+ buffer(const buffer&) = delete;
782
+ void operator=(const buffer&) = delete;
783
+
784
+ auto begin() FMT_NOEXCEPT -> T* { return ptr_; }
785
+ auto end() FMT_NOEXCEPT -> T* { return ptr_ + size_; }
786
+
787
+ auto begin() const FMT_NOEXCEPT -> const T* { return ptr_; }
788
+ auto end() const FMT_NOEXCEPT -> const T* { return ptr_ + size_; }
789
+
790
+ /** Returns the size of this buffer. */
791
+ auto size() const FMT_NOEXCEPT -> size_t { return size_; }
792
+
793
+ /** Returns the capacity of this buffer. */
794
+ auto capacity() const FMT_NOEXCEPT -> size_t { return capacity_; }
795
+
796
+ /** Returns a pointer to the buffer data. */
797
+ auto data() FMT_NOEXCEPT -> T* { return ptr_; }
798
+
799
+ /** Returns a pointer to the buffer data. */
800
+ auto data() const FMT_NOEXCEPT -> const T* { return ptr_; }
801
+
802
+ /** Clears this buffer. */
803
+ void clear() { size_ = 0; }
804
+
805
+ // Tries resizing the buffer to contain *count* elements. If T is a POD type
806
+ // the new elements may not be initialized.
807
+ void try_resize(size_t count) {
808
+ try_reserve(count);
809
+ size_ = count <= capacity_ ? count : capacity_;
810
+ }
811
+
812
+ // Tries increasing the buffer capacity to *new_capacity*. It can increase the
813
+ // capacity by a smaller amount than requested but guarantees there is space
814
+ // for at least one additional element either by increasing the capacity or by
815
+ // flushing the buffer if it is full.
816
+ void try_reserve(size_t new_capacity) {
817
+ if (new_capacity > capacity_) grow(new_capacity);
818
+ }
819
+
820
+ void push_back(const T& value) {
821
+ try_reserve(size_ + 1);
822
+ ptr_[size_++] = value;
823
+ }
824
+
825
+ /** Appends data to the end of the buffer. */
826
+ template <typename U> void append(const U* begin, const U* end);
827
+
828
+ template <typename I> auto operator[](I index) -> T& { return ptr_[index]; }
829
+ template <typename I> auto operator[](I index) const -> const T& {
830
+ return ptr_[index];
831
+ }
832
+ };
833
+
834
+ struct buffer_traits {
835
+ explicit buffer_traits(size_t) {}
836
+ auto count() const -> size_t { return 0; }
837
+ auto limit(size_t size) -> size_t { return size; }
838
+ };
839
+
840
+ class fixed_buffer_traits {
841
+ private:
842
+ size_t count_ = 0;
843
+ size_t limit_;
844
+
845
+ public:
846
+ explicit fixed_buffer_traits(size_t limit) : limit_(limit) {}
847
+ auto count() const -> size_t { return count_; }
848
+ auto limit(size_t size) -> size_t {
849
+ size_t n = limit_ > count_ ? limit_ - count_ : 0;
850
+ count_ += size;
851
+ return size < n ? size : n;
852
+ }
853
+ };
854
+
855
+ // A buffer that writes to an output iterator when flushed.
856
+ template <typename OutputIt, typename T, typename Traits = buffer_traits>
857
+ class iterator_buffer final : public Traits, public buffer<T> {
858
+ private:
859
+ OutputIt out_;
860
+ enum { buffer_size = 256 };
861
+ T data_[buffer_size];
862
+
863
+ protected:
864
+ void grow(size_t) final FMT_OVERRIDE {
865
+ if (this->size() == buffer_size) flush();
866
+ }
867
+
868
+ void flush() {
869
+ auto size = this->size();
870
+ this->clear();
871
+ out_ = copy_str<T>(data_, data_ + this->limit(size), out_);
872
+ }
873
+
874
+ public:
875
+ explicit iterator_buffer(OutputIt out, size_t n = buffer_size)
876
+ : Traits(n), buffer<T>(data_, 0, buffer_size), out_(out) {}
877
+ iterator_buffer(iterator_buffer&& other)
878
+ : Traits(other), buffer<T>(data_, 0, buffer_size), out_(other.out_) {}
879
+ ~iterator_buffer() { flush(); }
880
+
881
+ auto out() -> OutputIt {
882
+ flush();
883
+ return out_;
884
+ }
885
+ auto count() const -> size_t { return Traits::count() + this->size(); }
886
+ };
887
+
888
+ template <typename T> class iterator_buffer<T*, T> final : public buffer<T> {
889
+ protected:
890
+ void grow(size_t) final FMT_OVERRIDE {}
891
+
892
+ public:
893
+ explicit iterator_buffer(T* out, size_t = 0) : buffer<T>(out, 0, ~size_t()) {}
894
+
895
+ auto out() -> T* { return &*this->end(); }
896
+ };
897
+
898
+ // A buffer that writes to a container with the contiguous storage.
899
+ template <typename Container>
900
+ class iterator_buffer<std::back_insert_iterator<Container>,
901
+ enable_if_t<is_contiguous<Container>::value,
902
+ typename Container::value_type>>
903
+ final : public buffer<typename Container::value_type> {
904
+ private:
905
+ Container& container_;
906
+
907
+ protected:
908
+ void grow(size_t capacity) final FMT_OVERRIDE {
909
+ container_.resize(capacity);
910
+ this->set(&container_[0], capacity);
911
+ }
912
+
913
+ public:
914
+ explicit iterator_buffer(Container& c)
915
+ : buffer<typename Container::value_type>(c.size()), container_(c) {}
916
+ explicit iterator_buffer(std::back_insert_iterator<Container> out, size_t = 0)
917
+ : iterator_buffer(get_container(out)) {}
918
+ auto out() -> std::back_insert_iterator<Container> {
919
+ return std::back_inserter(container_);
920
+ }
921
+ };
922
+
923
+ // A buffer that counts the number of code units written discarding the output.
924
+ template <typename T = char> class counting_buffer final : public buffer<T> {
925
+ private:
926
+ enum { buffer_size = 256 };
927
+ T data_[buffer_size];
928
+ size_t count_ = 0;
929
+
930
+ protected:
931
+ void grow(size_t) final FMT_OVERRIDE {
932
+ if (this->size() != buffer_size) return;
933
+ count_ += this->size();
934
+ this->clear();
935
+ }
936
+
937
+ public:
938
+ counting_buffer() : buffer<T>(data_, 0, buffer_size) {}
939
+
940
+ auto count() -> size_t { return count_ + this->size(); }
941
+ };
942
+
943
+ template <typename T>
944
+ using buffer_appender = conditional_t<std::is_same<T, char>::value, appender,
945
+ std::back_insert_iterator<buffer<T>>>;
946
+
947
+ // Maps an output iterator to a buffer.
948
+ template <typename T, typename OutputIt>
949
+ auto get_buffer(OutputIt out) -> iterator_buffer<OutputIt, T> {
950
+ return iterator_buffer<OutputIt, T>(out);
951
+ }
952
+
953
+ template <typename Buffer>
954
+ auto get_iterator(Buffer& buf) -> decltype(buf.out()) {
955
+ return buf.out();
956
+ }
957
+ template <typename T> auto get_iterator(buffer<T>& buf) -> buffer_appender<T> {
958
+ return buffer_appender<T>(buf);
959
+ }
960
+
961
+ template <typename T, typename Char = char, typename Enable = void>
962
+ struct fallback_formatter {
963
+ fallback_formatter() = delete;
964
+ };
965
+
966
+ // Specifies if T has an enabled fallback_formatter specialization.
967
+ template <typename T, typename Char>
968
+ using has_fallback_formatter =
969
+ std::is_constructible<fallback_formatter<T, Char>>;
970
+
971
+ struct view {};
972
+
973
+ template <typename Char, typename T> struct named_arg : view {
974
+ const Char* name;
975
+ const T& value;
976
+ named_arg(const Char* n, const T& v) : name(n), value(v) {}
977
+ };
978
+
979
+ template <typename Char> struct named_arg_info {
980
+ const Char* name;
981
+ int id;
982
+ };
983
+
984
+ template <typename T, typename Char, size_t NUM_ARGS, size_t NUM_NAMED_ARGS>
985
+ struct arg_data {
986
+ // args_[0].named_args points to named_args_ to avoid bloating format_args.
987
+ // +1 to workaround a bug in gcc 7.5 that causes duplicated-branches warning.
988
+ T args_[1 + (NUM_ARGS != 0 ? NUM_ARGS : +1)];
989
+ named_arg_info<Char> named_args_[NUM_NAMED_ARGS];
990
+
991
+ template <typename... U>
992
+ arg_data(const U&... init) : args_{T(named_args_, NUM_NAMED_ARGS), init...} {}
993
+ arg_data(const arg_data& other) = delete;
994
+ auto args() const -> const T* { return args_ + 1; }
995
+ auto named_args() -> named_arg_info<Char>* { return named_args_; }
996
+ };
997
+
998
+ template <typename T, typename Char, size_t NUM_ARGS>
999
+ struct arg_data<T, Char, NUM_ARGS, 0> {
1000
+ // +1 to workaround a bug in gcc 7.5 that causes duplicated-branches warning.
1001
+ T args_[NUM_ARGS != 0 ? NUM_ARGS : +1];
1002
+
1003
+ template <typename... U>
1004
+ FMT_CONSTEXPR FMT_INLINE arg_data(const U&... init) : args_{init...} {}
1005
+ FMT_CONSTEXPR FMT_INLINE auto args() const -> const T* { return args_; }
1006
+ FMT_CONSTEXPR FMT_INLINE auto named_args() -> std::nullptr_t {
1007
+ return nullptr;
1008
+ }
1009
+ };
1010
+
1011
+ template <typename Char>
1012
+ inline void init_named_args(named_arg_info<Char>*, int, int) {}
1013
+
1014
+ template <typename T> struct is_named_arg : std::false_type {};
1015
+ template <typename T> struct is_statically_named_arg : std::false_type {};
1016
+
1017
+ template <typename T, typename Char>
1018
+ struct is_named_arg<named_arg<Char, T>> : std::true_type {};
1019
+
1020
+ template <typename Char, typename T, typename... Tail,
1021
+ FMT_ENABLE_IF(!is_named_arg<T>::value)>
1022
+ void init_named_args(named_arg_info<Char>* named_args, int arg_count,
1023
+ int named_arg_count, const T&, const Tail&... args) {
1024
+ init_named_args(named_args, arg_count + 1, named_arg_count, args...);
1025
+ }
1026
+
1027
+ template <typename Char, typename T, typename... Tail,
1028
+ FMT_ENABLE_IF(is_named_arg<T>::value)>
1029
+ void init_named_args(named_arg_info<Char>* named_args, int arg_count,
1030
+ int named_arg_count, const T& arg, const Tail&... args) {
1031
+ named_args[named_arg_count++] = {arg.name, arg_count};
1032
+ init_named_args(named_args, arg_count + 1, named_arg_count, args...);
1033
+ }
1034
+
1035
+ template <typename... Args>
1036
+ FMT_CONSTEXPR FMT_INLINE void init_named_args(std::nullptr_t, int, int,
1037
+ const Args&...) {}
1038
+
1039
+ template <bool B = false> constexpr auto count() -> size_t { return B ? 1 : 0; }
1040
+ template <bool B1, bool B2, bool... Tail> constexpr auto count() -> size_t {
1041
+ return (B1 ? 1 : 0) + count<B2, Tail...>();
1042
+ }
1043
+
1044
+ template <typename... Args> constexpr auto count_named_args() -> size_t {
1045
+ return count<is_named_arg<Args>::value...>();
1046
+ }
1047
+
1048
+ enum class type {
1049
+ none_type,
1050
+ // Integer types should go first,
1051
+ int_type,
1052
+ uint_type,
1053
+ long_long_type,
1054
+ ulong_long_type,
1055
+ int128_type,
1056
+ uint128_type,
1057
+ bool_type,
1058
+ char_type,
1059
+ last_integer_type = char_type,
1060
+ // followed by floating-point types.
1061
+ float_type,
1062
+ double_type,
1063
+ long_double_type,
1064
+ last_numeric_type = long_double_type,
1065
+ cstring_type,
1066
+ string_type,
1067
+ pointer_type,
1068
+ custom_type
1069
+ };
1070
+
1071
+ // Maps core type T to the corresponding type enum constant.
1072
+ template <typename T, typename Char>
1073
+ struct type_constant : std::integral_constant<type, type::custom_type> {};
1074
+
1075
+ #define FMT_TYPE_CONSTANT(Type, constant) \
1076
+ template <typename Char> \
1077
+ struct type_constant<Type, Char> \
1078
+ : std::integral_constant<type, type::constant> {}
1079
+
1080
+ FMT_TYPE_CONSTANT(int, int_type);
1081
+ FMT_TYPE_CONSTANT(unsigned, uint_type);
1082
+ FMT_TYPE_CONSTANT(long long, long_long_type);
1083
+ FMT_TYPE_CONSTANT(unsigned long long, ulong_long_type);
1084
+ FMT_TYPE_CONSTANT(int128_t, int128_type);
1085
+ FMT_TYPE_CONSTANT(uint128_t, uint128_type);
1086
+ FMT_TYPE_CONSTANT(bool, bool_type);
1087
+ FMT_TYPE_CONSTANT(Char, char_type);
1088
+ FMT_TYPE_CONSTANT(float, float_type);
1089
+ FMT_TYPE_CONSTANT(double, double_type);
1090
+ FMT_TYPE_CONSTANT(long double, long_double_type);
1091
+ FMT_TYPE_CONSTANT(const Char*, cstring_type);
1092
+ FMT_TYPE_CONSTANT(basic_string_view<Char>, string_type);
1093
+ FMT_TYPE_CONSTANT(const void*, pointer_type);
1094
+
1095
+ constexpr bool is_integral_type(type t) {
1096
+ return t > type::none_type && t <= type::last_integer_type;
1097
+ }
1098
+
1099
+ constexpr bool is_arithmetic_type(type t) {
1100
+ return t > type::none_type && t <= type::last_numeric_type;
1101
+ }
1102
+
1103
+ template <typename Char> struct string_value {
1104
+ const Char* data;
1105
+ size_t size;
1106
+ };
1107
+
1108
+ template <typename Char> struct named_arg_value {
1109
+ const named_arg_info<Char>* data;
1110
+ size_t size;
1111
+ };
1112
+
1113
+ template <typename Context> struct custom_value {
1114
+ using parse_context = typename Context::parse_context_type;
1115
+ const void* value;
1116
+ void (*format)(const void* arg, parse_context& parse_ctx, Context& ctx);
1117
+ };
1118
+
1119
+ // A formatting argument value.
1120
+ template <typename Context> class value {
1121
+ public:
1122
+ using char_type = typename Context::char_type;
1123
+
1124
+ union {
1125
+ monostate no_value;
1126
+ int int_value;
1127
+ unsigned uint_value;
1128
+ long long long_long_value;
1129
+ unsigned long long ulong_long_value;
1130
+ int128_t int128_value;
1131
+ uint128_t uint128_value;
1132
+ bool bool_value;
1133
+ char_type char_value;
1134
+ float float_value;
1135
+ double double_value;
1136
+ long double long_double_value;
1137
+ const void* pointer;
1138
+ string_value<char_type> string;
1139
+ custom_value<Context> custom;
1140
+ named_arg_value<char_type> named_args;
1141
+ };
1142
+
1143
+ constexpr FMT_INLINE value() : no_value() {}
1144
+ constexpr FMT_INLINE value(int val) : int_value(val) {}
1145
+ constexpr FMT_INLINE value(unsigned val) : uint_value(val) {}
1146
+ constexpr FMT_INLINE value(long long val) : long_long_value(val) {}
1147
+ constexpr FMT_INLINE value(unsigned long long val) : ulong_long_value(val) {}
1148
+ FMT_INLINE value(int128_t val) : int128_value(val) {}
1149
+ FMT_INLINE value(uint128_t val) : uint128_value(val) {}
1150
+ FMT_INLINE value(float val) : float_value(val) {}
1151
+ FMT_INLINE value(double val) : double_value(val) {}
1152
+ FMT_INLINE value(long double val) : long_double_value(val) {}
1153
+ constexpr FMT_INLINE value(bool val) : bool_value(val) {}
1154
+ constexpr FMT_INLINE value(char_type val) : char_value(val) {}
1155
+ FMT_CONSTEXPR FMT_INLINE value(const char_type* val) {
1156
+ string.data = val;
1157
+ if (is_constant_evaluated()) string.size = {};
1158
+ }
1159
+ FMT_CONSTEXPR FMT_INLINE value(basic_string_view<char_type> val) {
1160
+ string.data = val.data();
1161
+ string.size = val.size();
1162
+ }
1163
+ FMT_INLINE value(const void* val) : pointer(val) {}
1164
+ FMT_INLINE value(const named_arg_info<char_type>* args, size_t size)
1165
+ : named_args{args, size} {}
1166
+
1167
+ template <typename T> FMT_CONSTEXPR FMT_INLINE value(const T& val) {
1168
+ custom.value = &val;
1169
+ // Get the formatter type through the context to allow different contexts
1170
+ // have different extension points, e.g. `formatter<T>` for `format` and
1171
+ // `printf_formatter<T>` for `printf`.
1172
+ custom.format = format_custom_arg<
1173
+ T, conditional_t<has_formatter<T, Context>::value,
1174
+ typename Context::template formatter_type<T>,
1175
+ fallback_formatter<T, char_type>>>;
1176
+ }
1177
+
1178
+ private:
1179
+ // Formats an argument of a custom type, such as a user-defined class.
1180
+ template <typename T, typename Formatter>
1181
+ static void format_custom_arg(const void* arg,
1182
+ typename Context::parse_context_type& parse_ctx,
1183
+ Context& ctx) {
1184
+ Formatter f;
1185
+ parse_ctx.advance_to(f.parse(parse_ctx));
1186
+ ctx.advance_to(f.format(*static_cast<const T*>(arg), ctx));
1187
+ }
1188
+ };
1189
+
1190
+ template <typename Context, typename T>
1191
+ FMT_CONSTEXPR auto make_arg(const T& value) -> basic_format_arg<Context>;
1192
+
1193
+ // To minimize the number of types we need to deal with, long is translated
1194
+ // either to int or to long long depending on its size.
1195
+ enum { long_short = sizeof(long) == sizeof(int) };
1196
+ using long_type = conditional_t<long_short, int, long long>;
1197
+ using ulong_type = conditional_t<long_short, unsigned, unsigned long long>;
1198
+
1199
+ struct unformattable {};
1200
+
1201
+ // Maps formatting arguments to core types.
1202
+ template <typename Context> struct arg_mapper {
1203
+ using char_type = typename Context::char_type;
1204
+
1205
+ FMT_CONSTEXPR FMT_INLINE auto map(signed char val) -> int { return val; }
1206
+ FMT_CONSTEXPR FMT_INLINE auto map(unsigned char val) -> unsigned {
1207
+ return val;
1208
+ }
1209
+ FMT_CONSTEXPR FMT_INLINE auto map(short val) -> int { return val; }
1210
+ FMT_CONSTEXPR FMT_INLINE auto map(unsigned short val) -> unsigned {
1211
+ return val;
1212
+ }
1213
+ FMT_CONSTEXPR FMT_INLINE auto map(int val) -> int { return val; }
1214
+ FMT_CONSTEXPR FMT_INLINE auto map(unsigned val) -> unsigned { return val; }
1215
+ FMT_CONSTEXPR FMT_INLINE auto map(long val) -> long_type { return val; }
1216
+ FMT_CONSTEXPR FMT_INLINE auto map(unsigned long val) -> ulong_type {
1217
+ return val;
1218
+ }
1219
+ FMT_CONSTEXPR FMT_INLINE auto map(long long val) -> long long { return val; }
1220
+ FMT_CONSTEXPR FMT_INLINE auto map(unsigned long long val)
1221
+ -> unsigned long long {
1222
+ return val;
1223
+ }
1224
+ FMT_CONSTEXPR FMT_INLINE auto map(int128_t val) -> int128_t { return val; }
1225
+ FMT_CONSTEXPR FMT_INLINE auto map(uint128_t val) -> uint128_t { return val; }
1226
+ FMT_CONSTEXPR FMT_INLINE auto map(bool val) -> bool { return val; }
1227
+
1228
+ template <typename T, FMT_ENABLE_IF(is_char<T>::value)>
1229
+ FMT_CONSTEXPR FMT_INLINE auto map(T val) -> char_type {
1230
+ static_assert(
1231
+ std::is_same<T, char>::value || std::is_same<T, char_type>::value,
1232
+ "mixing character types is disallowed");
1233
+ return val;
1234
+ }
1235
+
1236
+ FMT_CONSTEXPR FMT_INLINE auto map(float val) -> float { return val; }
1237
+ FMT_CONSTEXPR FMT_INLINE auto map(double val) -> double { return val; }
1238
+ FMT_CONSTEXPR FMT_INLINE auto map(long double val) -> long double {
1239
+ return val;
1240
+ }
1241
+
1242
+ FMT_CONSTEXPR FMT_INLINE auto map(char_type* val) -> const char_type* {
1243
+ return val;
1244
+ }
1245
+ FMT_CONSTEXPR FMT_INLINE auto map(const char_type* val) -> const char_type* {
1246
+ return val;
1247
+ }
1248
+ template <typename T, FMT_ENABLE_IF(is_string<T>::value)>
1249
+ FMT_CONSTEXPR FMT_INLINE auto map(const T& val)
1250
+ -> basic_string_view<char_type> {
1251
+ static_assert(std::is_same<char_type, char_t<T>>::value,
1252
+ "mixing character types is disallowed");
1253
+ return to_string_view(val);
1254
+ }
1255
+ template <typename T,
1256
+ FMT_ENABLE_IF(
1257
+ std::is_constructible<basic_string_view<char_type>, T>::value &&
1258
+ !is_string<T>::value && !has_formatter<T, Context>::value &&
1259
+ !has_fallback_formatter<T, char_type>::value)>
1260
+ FMT_CONSTEXPR FMT_INLINE auto map(const T& val)
1261
+ -> basic_string_view<char_type> {
1262
+ return basic_string_view<char_type>(val);
1263
+ }
1264
+ template <
1265
+ typename T,
1266
+ FMT_ENABLE_IF(
1267
+ std::is_constructible<std_string_view<char_type>, T>::value &&
1268
+ !std::is_constructible<basic_string_view<char_type>, T>::value &&
1269
+ !is_string<T>::value && !has_formatter<T, Context>::value &&
1270
+ !has_fallback_formatter<T, char_type>::value)>
1271
+ FMT_CONSTEXPR FMT_INLINE auto map(const T& val)
1272
+ -> basic_string_view<char_type> {
1273
+ return std_string_view<char_type>(val);
1274
+ }
1275
+ FMT_CONSTEXPR FMT_INLINE auto map(const signed char* val) -> const char* {
1276
+ static_assert(std::is_same<char_type, char>::value, "invalid string type");
1277
+ return reinterpret_cast<const char*>(val);
1278
+ }
1279
+ FMT_CONSTEXPR FMT_INLINE auto map(const unsigned char* val) -> const char* {
1280
+ static_assert(std::is_same<char_type, char>::value, "invalid string type");
1281
+ return reinterpret_cast<const char*>(val);
1282
+ }
1283
+ FMT_CONSTEXPR FMT_INLINE auto map(signed char* val) -> const char* {
1284
+ const auto* const_val = val;
1285
+ return map(const_val);
1286
+ }
1287
+ FMT_CONSTEXPR FMT_INLINE auto map(unsigned char* val) -> const char* {
1288
+ const auto* const_val = val;
1289
+ return map(const_val);
1290
+ }
1291
+
1292
+ FMT_CONSTEXPR FMT_INLINE auto map(void* val) -> const void* { return val; }
1293
+ FMT_CONSTEXPR FMT_INLINE auto map(const void* val) -> const void* {
1294
+ return val;
1295
+ }
1296
+ FMT_CONSTEXPR FMT_INLINE auto map(std::nullptr_t val) -> const void* {
1297
+ return val;
1298
+ }
1299
+
1300
+ // We use SFINAE instead of a const T* parameter to avoid conflicting with
1301
+ // the C array overload.
1302
+ template <typename T>
1303
+ FMT_CONSTEXPR auto map(T) -> enable_if_t<std::is_pointer<T>::value, int> {
1304
+ // Formatting of arbitrary pointers is disallowed. If you want to output
1305
+ // a pointer cast it to "void *" or "const void *". In particular, this
1306
+ // forbids formatting of "[const] volatile char *" which is printed as bool
1307
+ // by iostreams.
1308
+ static_assert(!sizeof(T), "formatting of non-void pointers is disallowed");
1309
+ return 0;
1310
+ }
1311
+
1312
+ template <typename T, std::size_t N>
1313
+ FMT_CONSTEXPR FMT_INLINE auto map(const T (&values)[N]) -> const T (&)[N] {
1314
+ return values;
1315
+ }
1316
+
1317
+ template <typename T,
1318
+ FMT_ENABLE_IF(std::is_enum<T>::value &&
1319
+ !has_formatter<T, Context>::value &&
1320
+ !has_fallback_formatter<T, char_type>::value)>
1321
+ FMT_CONSTEXPR FMT_INLINE auto map(const T& val)
1322
+ -> decltype(std::declval<arg_mapper>().map(
1323
+ static_cast<typename std::underlying_type<T>::type>(val))) {
1324
+ return map(static_cast<typename std::underlying_type<T>::type>(val));
1325
+ }
1326
+ template <typename T,
1327
+ FMT_ENABLE_IF(!is_string<T>::value && !is_char<T>::value &&
1328
+ (has_formatter<T, Context>::value ||
1329
+ has_fallback_formatter<T, char_type>::value))>
1330
+ FMT_CONSTEXPR FMT_INLINE auto map(const T& val) -> const T& {
1331
+ return val;
1332
+ }
1333
+
1334
+ template <typename T, FMT_ENABLE_IF(is_named_arg<T>::value)>
1335
+ FMT_CONSTEXPR FMT_INLINE auto map(const T& named_arg)
1336
+ -> decltype(std::declval<arg_mapper>().map(named_arg.value)) {
1337
+ return map(named_arg.value);
1338
+ }
1339
+
1340
+ auto map(...) -> unformattable { return {}; }
1341
+ };
1342
+
1343
+ // A type constant after applying arg_mapper<Context>.
1344
+ template <typename T, typename Context>
1345
+ using mapped_type_constant =
1346
+ type_constant<decltype(arg_mapper<Context>().map(std::declval<const T&>())),
1347
+ typename Context::char_type>;
1348
+
1349
+ enum { packed_arg_bits = 4 };
1350
+ // Maximum number of arguments with packed types.
1351
+ enum { max_packed_args = 62 / packed_arg_bits };
1352
+ enum : unsigned long long { is_unpacked_bit = 1ULL << 63 };
1353
+ enum : unsigned long long { has_named_args_bit = 1ULL << 62 };
1354
+
1355
+ FMT_END_DETAIL_NAMESPACE
1356
+
1357
+ // An output iterator that appends to a buffer.
1358
+ // It is used to reduce symbol sizes for the common case.
1359
+ class appender : public std::back_insert_iterator<detail::buffer<char>> {
1360
+ using base = std::back_insert_iterator<detail::buffer<char>>;
1361
+
1362
+ template <typename T>
1363
+ friend auto get_buffer(appender out) -> detail::buffer<char>& {
1364
+ return detail::get_container(out);
1365
+ }
1366
+
1367
+ public:
1368
+ using std::back_insert_iterator<detail::buffer<char>>::back_insert_iterator;
1369
+ appender(base it) : base(it) {}
1370
+ using _Unchecked_type = appender; // Mark iterator as checked.
1371
+
1372
+ auto operator++() -> appender& {
1373
+ base::operator++();
1374
+ return *this;
1375
+ }
1376
+
1377
+ auto operator++(int) -> appender {
1378
+ auto tmp = *this;
1379
+ ++*this;
1380
+ return tmp;
1381
+ }
1382
+ };
1383
+
1384
+ // A formatting argument. It is a trivially copyable/constructible type to
1385
+ // allow storage in basic_memory_buffer.
1386
+ template <typename Context> class basic_format_arg {
1387
+ private:
1388
+ detail::value<Context> value_;
1389
+ detail::type type_;
1390
+
1391
+ template <typename ContextType, typename T>
1392
+ friend FMT_CONSTEXPR auto detail::make_arg(const T& value)
1393
+ -> basic_format_arg<ContextType>;
1394
+
1395
+ template <typename Visitor, typename Ctx>
1396
+ friend FMT_CONSTEXPR auto visit_format_arg(Visitor&& vis,
1397
+ const basic_format_arg<Ctx>& arg)
1398
+ -> decltype(vis(0));
1399
+
1400
+ friend class basic_format_args<Context>;
1401
+ friend class dynamic_format_arg_store<Context>;
1402
+
1403
+ using char_type = typename Context::char_type;
1404
+
1405
+ template <typename T, typename Char, size_t NUM_ARGS, size_t NUM_NAMED_ARGS>
1406
+ friend struct detail::arg_data;
1407
+
1408
+ basic_format_arg(const detail::named_arg_info<char_type>* args, size_t size)
1409
+ : value_(args, size) {}
1410
+
1411
+ public:
1412
+ class handle {
1413
+ public:
1414
+ explicit handle(detail::custom_value<Context> custom) : custom_(custom) {}
1415
+
1416
+ void format(typename Context::parse_context_type& parse_ctx,
1417
+ Context& ctx) const {
1418
+ custom_.format(custom_.value, parse_ctx, ctx);
1419
+ }
1420
+
1421
+ private:
1422
+ detail::custom_value<Context> custom_;
1423
+ };
1424
+
1425
+ constexpr basic_format_arg() : type_(detail::type::none_type) {}
1426
+
1427
+ constexpr explicit operator bool() const FMT_NOEXCEPT {
1428
+ return type_ != detail::type::none_type;
1429
+ }
1430
+
1431
+ auto type() const -> detail::type { return type_; }
1432
+
1433
+ auto is_integral() const -> bool { return detail::is_integral_type(type_); }
1434
+ auto is_arithmetic() const -> bool {
1435
+ return detail::is_arithmetic_type(type_);
1436
+ }
1437
+ };
1438
+
1439
+ /**
1440
+ \rst
1441
+ Visits an argument dispatching to the appropriate visit method based on
1442
+ the argument type. For example, if the argument type is ``double`` then
1443
+ ``vis(value)`` will be called with the value of type ``double``.
1444
+ \endrst
1445
+ */
1446
+ template <typename Visitor, typename Context>
1447
+ FMT_CONSTEXPR FMT_INLINE auto visit_format_arg(
1448
+ Visitor&& vis, const basic_format_arg<Context>& arg) -> decltype(vis(0)) {
1449
+ switch (arg.type_) {
1450
+ case detail::type::none_type:
1451
+ break;
1452
+ case detail::type::int_type:
1453
+ return vis(arg.value_.int_value);
1454
+ case detail::type::uint_type:
1455
+ return vis(arg.value_.uint_value);
1456
+ case detail::type::long_long_type:
1457
+ return vis(arg.value_.long_long_value);
1458
+ case detail::type::ulong_long_type:
1459
+ return vis(arg.value_.ulong_long_value);
1460
+ case detail::type::int128_type:
1461
+ return vis(detail::convert_for_visit(arg.value_.int128_value));
1462
+ case detail::type::uint128_type:
1463
+ return vis(detail::convert_for_visit(arg.value_.uint128_value));
1464
+ case detail::type::bool_type:
1465
+ return vis(arg.value_.bool_value);
1466
+ case detail::type::char_type:
1467
+ return vis(arg.value_.char_value);
1468
+ case detail::type::float_type:
1469
+ return vis(arg.value_.float_value);
1470
+ case detail::type::double_type:
1471
+ return vis(arg.value_.double_value);
1472
+ case detail::type::long_double_type:
1473
+ return vis(arg.value_.long_double_value);
1474
+ case detail::type::cstring_type:
1475
+ return vis(arg.value_.string.data);
1476
+ case detail::type::string_type:
1477
+ using sv = basic_string_view<typename Context::char_type>;
1478
+ return vis(sv(arg.value_.string.data, arg.value_.string.size));
1479
+ case detail::type::pointer_type:
1480
+ return vis(arg.value_.pointer);
1481
+ case detail::type::custom_type:
1482
+ return vis(typename basic_format_arg<Context>::handle(arg.value_.custom));
1483
+ }
1484
+ return vis(monostate());
1485
+ }
1486
+
1487
+ FMT_BEGIN_DETAIL_NAMESPACE
1488
+
1489
+ template <typename Char, typename InputIt>
1490
+ auto copy_str(InputIt begin, InputIt end, appender out) -> appender {
1491
+ get_container(out).append(begin, end);
1492
+ return out;
1493
+ }
1494
+
1495
+ #if FMT_GCC_VERSION && FMT_GCC_VERSION < 500
1496
+ // A workaround for gcc 4.8 to make void_t work in a SFINAE context.
1497
+ template <typename... Ts> struct void_t_impl { using type = void; };
1498
+ template <typename... Ts>
1499
+ using void_t = typename detail::void_t_impl<Ts...>::type;
1500
+ #else
1501
+ template <typename...> using void_t = void;
1502
+ #endif
1503
+
1504
+ template <typename It, typename T, typename Enable = void>
1505
+ struct is_output_iterator : std::false_type {};
1506
+
1507
+ template <typename It, typename T>
1508
+ struct is_output_iterator<
1509
+ It, T,
1510
+ void_t<typename std::iterator_traits<It>::iterator_category,
1511
+ decltype(*std::declval<It>() = std::declval<T>())>>
1512
+ : std::true_type {};
1513
+
1514
+ template <typename OutputIt>
1515
+ struct is_back_insert_iterator : std::false_type {};
1516
+ template <typename Container>
1517
+ struct is_back_insert_iterator<std::back_insert_iterator<Container>>
1518
+ : std::true_type {};
1519
+
1520
+ template <typename OutputIt>
1521
+ struct is_contiguous_back_insert_iterator : std::false_type {};
1522
+ template <typename Container>
1523
+ struct is_contiguous_back_insert_iterator<std::back_insert_iterator<Container>>
1524
+ : is_contiguous<Container> {};
1525
+ template <>
1526
+ struct is_contiguous_back_insert_iterator<appender> : std::true_type {};
1527
+
1528
+ // A type-erased reference to an std::locale to avoid heavy <locale> include.
1529
+ class locale_ref {
1530
+ private:
1531
+ const void* locale_; // A type-erased pointer to std::locale.
1532
+
1533
+ public:
1534
+ constexpr locale_ref() : locale_(nullptr) {}
1535
+ template <typename Locale> explicit locale_ref(const Locale& loc);
1536
+
1537
+ explicit operator bool() const FMT_NOEXCEPT { return locale_ != nullptr; }
1538
+
1539
+ template <typename Locale> auto get() const -> Locale;
1540
+ };
1541
+
1542
+ template <typename> constexpr auto encode_types() -> unsigned long long {
1543
+ return 0;
1544
+ }
1545
+
1546
+ template <typename Context, typename Arg, typename... Args>
1547
+ constexpr auto encode_types() -> unsigned long long {
1548
+ return static_cast<unsigned>(mapped_type_constant<Arg, Context>::value) |
1549
+ (encode_types<Context, Args...>() << packed_arg_bits);
1550
+ }
1551
+
1552
+ template <typename Context, typename T>
1553
+ FMT_CONSTEXPR auto make_arg(const T& value) -> basic_format_arg<Context> {
1554
+ basic_format_arg<Context> arg;
1555
+ arg.type_ = mapped_type_constant<T, Context>::value;
1556
+ arg.value_ = arg_mapper<Context>().map(value);
1557
+ return arg;
1558
+ }
1559
+
1560
+ // The type template parameter is there to avoid an ODR violation when using
1561
+ // a fallback formatter in one translation unit and an implicit conversion in
1562
+ // another (not recommended).
1563
+ template <bool IS_PACKED, typename Context, type, typename T,
1564
+ FMT_ENABLE_IF(IS_PACKED)>
1565
+ FMT_CONSTEXPR FMT_INLINE auto make_arg(const T& val) -> value<Context> {
1566
+ const auto& arg = arg_mapper<Context>().map(val);
1567
+ static_assert(
1568
+ !std::is_same<decltype(arg), const unformattable&>::value,
1569
+ "Cannot format an argument. To make type T formattable provide a "
1570
+ "formatter<T> specialization: https://fmt.dev/latest/api.html#udt");
1571
+ return {arg};
1572
+ }
1573
+
1574
+ template <bool IS_PACKED, typename Context, type, typename T,
1575
+ FMT_ENABLE_IF(!IS_PACKED)>
1576
+ inline auto make_arg(const T& value) -> basic_format_arg<Context> {
1577
+ return make_arg<Context>(value);
1578
+ }
1579
+ FMT_END_DETAIL_NAMESPACE
1580
+
1581
+ // Formatting context.
1582
+ template <typename OutputIt, typename Char> class basic_format_context {
1583
+ public:
1584
+ /** The character type for the output. */
1585
+ using char_type = Char;
1586
+
1587
+ private:
1588
+ OutputIt out_;
1589
+ basic_format_args<basic_format_context> args_;
1590
+ detail::locale_ref loc_;
1591
+
1592
+ public:
1593
+ using iterator = OutputIt;
1594
+ using format_arg = basic_format_arg<basic_format_context>;
1595
+ using parse_context_type = basic_format_parse_context<Char>;
1596
+ template <typename T> using formatter_type = formatter<T, char_type>;
1597
+
1598
+ basic_format_context(basic_format_context&&) = default;
1599
+ basic_format_context(const basic_format_context&) = delete;
1600
+ void operator=(const basic_format_context&) = delete;
1601
+ /**
1602
+ Constructs a ``basic_format_context`` object. References to the arguments are
1603
+ stored in the object so make sure they have appropriate lifetimes.
1604
+ */
1605
+ constexpr basic_format_context(
1606
+ OutputIt out, basic_format_args<basic_format_context> ctx_args,
1607
+ detail::locale_ref loc = detail::locale_ref())
1608
+ : out_(out), args_(ctx_args), loc_(loc) {}
1609
+
1610
+ constexpr auto arg(int id) const -> format_arg { return args_.get(id); }
1611
+ FMT_CONSTEXPR auto arg(basic_string_view<char_type> name) -> format_arg {
1612
+ return args_.get(name);
1613
+ }
1614
+ FMT_CONSTEXPR auto arg_id(basic_string_view<char_type> name) -> int {
1615
+ return args_.get_id(name);
1616
+ }
1617
+ auto args() const -> const basic_format_args<basic_format_context>& {
1618
+ return args_;
1619
+ }
1620
+
1621
+ FMT_CONSTEXPR auto error_handler() -> detail::error_handler { return {}; }
1622
+ void on_error(const char* message) { error_handler().on_error(message); }
1623
+
1624
+ // Returns an iterator to the beginning of the output range.
1625
+ FMT_CONSTEXPR auto out() -> iterator { return out_; }
1626
+
1627
+ // Advances the begin iterator to ``it``.
1628
+ void advance_to(iterator it) {
1629
+ if (!detail::is_back_insert_iterator<iterator>()) out_ = it;
1630
+ }
1631
+
1632
+ FMT_CONSTEXPR auto locale() -> detail::locale_ref { return loc_; }
1633
+ };
1634
+
1635
+ template <typename Char>
1636
+ using buffer_context =
1637
+ basic_format_context<detail::buffer_appender<Char>, Char>;
1638
+ using format_context = buffer_context<char>;
1639
+
1640
+ // Workaround an alias issue: https://stackoverflow.com/q/62767544/471164.
1641
+ #define FMT_BUFFER_CONTEXT(Char) \
1642
+ basic_format_context<detail::buffer_appender<Char>, Char>
1643
+
1644
+ template <typename T, typename Char = char>
1645
+ using is_formattable = bool_constant<
1646
+ !std::is_same<decltype(detail::arg_mapper<buffer_context<Char>>().map(
1647
+ std::declval<T>())),
1648
+ detail::unformattable>::value &&
1649
+ !detail::has_fallback_formatter<T, Char>::value>;
1650
+
1651
+ /**
1652
+ \rst
1653
+ An array of references to arguments. It can be implicitly converted into
1654
+ `~fmt::basic_format_args` for passing into type-erased formatting functions
1655
+ such as `~fmt::vformat`.
1656
+ \endrst
1657
+ */
1658
+ template <typename Context, typename... Args>
1659
+ class format_arg_store
1660
+ #if FMT_GCC_VERSION && FMT_GCC_VERSION < 409
1661
+ // Workaround a GCC template argument substitution bug.
1662
+ : public basic_format_args<Context>
1663
+ #endif
1664
+ {
1665
+ private:
1666
+ static const size_t num_args = sizeof...(Args);
1667
+ static const size_t num_named_args = detail::count_named_args<Args...>();
1668
+ static const bool is_packed = num_args <= detail::max_packed_args;
1669
+
1670
+ using value_type = conditional_t<is_packed, detail::value<Context>,
1671
+ basic_format_arg<Context>>;
1672
+
1673
+ detail::arg_data<value_type, typename Context::char_type, num_args,
1674
+ num_named_args>
1675
+ data_;
1676
+
1677
+ friend class basic_format_args<Context>;
1678
+
1679
+ static constexpr unsigned long long desc =
1680
+ (is_packed ? detail::encode_types<Context, Args...>()
1681
+ : detail::is_unpacked_bit | num_args) |
1682
+ (num_named_args != 0
1683
+ ? static_cast<unsigned long long>(detail::has_named_args_bit)
1684
+ : 0);
1685
+
1686
+ public:
1687
+ FMT_CONSTEXPR FMT_INLINE format_arg_store(const Args&... args)
1688
+ :
1689
+ #if FMT_GCC_VERSION && FMT_GCC_VERSION < 409
1690
+ basic_format_args<Context>(*this),
1691
+ #endif
1692
+ data_{detail::make_arg<
1693
+ is_packed, Context,
1694
+ detail::mapped_type_constant<Args, Context>::value>(args)...} {
1695
+ detail::init_named_args(data_.named_args(), 0, 0, args...);
1696
+ }
1697
+ };
1698
+
1699
+ /**
1700
+ \rst
1701
+ Constructs a `~fmt::format_arg_store` object that contains references to
1702
+ arguments and can be implicitly converted to `~fmt::format_args`. `Context`
1703
+ can be omitted in which case it defaults to `~fmt::context`.
1704
+ See `~fmt::arg` for lifetime considerations.
1705
+ \endrst
1706
+ */
1707
+ template <typename Context = format_context, typename... Args>
1708
+ constexpr auto make_format_args(const Args&... args)
1709
+ -> format_arg_store<Context, Args...> {
1710
+ return {args...};
1711
+ }
1712
+
1713
+ /**
1714
+ \rst
1715
+ Returns a named argument to be used in a formatting function.
1716
+ It should only be used in a call to a formatting function or
1717
+ `dynamic_format_arg_store::push_back`.
1718
+
1719
+ **Example**::
1720
+
1721
+ fmt::print("Elapsed time: {s:.2f} seconds", fmt::arg("s", 1.23));
1722
+ \endrst
1723
+ */
1724
+ template <typename Char, typename T>
1725
+ inline auto arg(const Char* name, const T& arg) -> detail::named_arg<Char, T> {
1726
+ static_assert(!detail::is_named_arg<T>(), "nested named arguments");
1727
+ return {name, arg};
1728
+ }
1729
+
1730
+ /**
1731
+ \rst
1732
+ A view of a collection of formatting arguments. To avoid lifetime issues it
1733
+ should only be used as a parameter type in type-erased functions such as
1734
+ ``vformat``::
1735
+
1736
+ void vlog(string_view format_str, format_args args); // OK
1737
+ format_args args = make_format_args(42); // Error: dangling reference
1738
+ \endrst
1739
+ */
1740
+ template <typename Context> class basic_format_args {
1741
+ public:
1742
+ using size_type = int;
1743
+ using format_arg = basic_format_arg<Context>;
1744
+
1745
+ private:
1746
+ // A descriptor that contains information about formatting arguments.
1747
+ // If the number of arguments is less or equal to max_packed_args then
1748
+ // argument types are passed in the descriptor. This reduces binary code size
1749
+ // per formatting function call.
1750
+ unsigned long long desc_;
1751
+ union {
1752
+ // If is_packed() returns true then argument values are stored in values_;
1753
+ // otherwise they are stored in args_. This is done to improve cache
1754
+ // locality and reduce compiled code size since storing larger objects
1755
+ // may require more code (at least on x86-64) even if the same amount of
1756
+ // data is actually copied to stack. It saves ~10% on the bloat test.
1757
+ const detail::value<Context>* values_;
1758
+ const format_arg* args_;
1759
+ };
1760
+
1761
+ constexpr auto is_packed() const -> bool {
1762
+ return (desc_ & detail::is_unpacked_bit) == 0;
1763
+ }
1764
+ auto has_named_args() const -> bool {
1765
+ return (desc_ & detail::has_named_args_bit) != 0;
1766
+ }
1767
+
1768
+ FMT_CONSTEXPR auto type(int index) const -> detail::type {
1769
+ int shift = index * detail::packed_arg_bits;
1770
+ unsigned int mask = (1 << detail::packed_arg_bits) - 1;
1771
+ return static_cast<detail::type>((desc_ >> shift) & mask);
1772
+ }
1773
+
1774
+ constexpr FMT_INLINE basic_format_args(unsigned long long desc,
1775
+ const detail::value<Context>* values)
1776
+ : desc_(desc), values_(values) {}
1777
+ constexpr basic_format_args(unsigned long long desc, const format_arg* args)
1778
+ : desc_(desc), args_(args) {}
1779
+
1780
+ public:
1781
+ constexpr basic_format_args() : desc_(0), args_(nullptr) {}
1782
+
1783
+ /**
1784
+ \rst
1785
+ Constructs a `basic_format_args` object from `~fmt::format_arg_store`.
1786
+ \endrst
1787
+ */
1788
+ template <typename... Args>
1789
+ constexpr FMT_INLINE basic_format_args(
1790
+ const format_arg_store<Context, Args...>& store)
1791
+ : basic_format_args(format_arg_store<Context, Args...>::desc,
1792
+ store.data_.args()) {}
1793
+
1794
+ /**
1795
+ \rst
1796
+ Constructs a `basic_format_args` object from
1797
+ `~fmt::dynamic_format_arg_store`.
1798
+ \endrst
1799
+ */
1800
+ constexpr FMT_INLINE basic_format_args(
1801
+ const dynamic_format_arg_store<Context>& store)
1802
+ : basic_format_args(store.get_types(), store.data()) {}
1803
+
1804
+ /**
1805
+ \rst
1806
+ Constructs a `basic_format_args` object from a dynamic set of arguments.
1807
+ \endrst
1808
+ */
1809
+ constexpr basic_format_args(const format_arg* args, int count)
1810
+ : basic_format_args(detail::is_unpacked_bit | detail::to_unsigned(count),
1811
+ args) {}
1812
+
1813
+ /** Returns the argument with the specified id. */
1814
+ FMT_CONSTEXPR auto get(int id) const -> format_arg {
1815
+ format_arg arg;
1816
+ if (!is_packed()) {
1817
+ if (id < max_size()) arg = args_[id];
1818
+ return arg;
1819
+ }
1820
+ if (id >= detail::max_packed_args) return arg;
1821
+ arg.type_ = type(id);
1822
+ if (arg.type_ == detail::type::none_type) return arg;
1823
+ arg.value_ = values_[id];
1824
+ return arg;
1825
+ }
1826
+
1827
+ template <typename Char>
1828
+ auto get(basic_string_view<Char> name) const -> format_arg {
1829
+ int id = get_id(name);
1830
+ return id >= 0 ? get(id) : format_arg();
1831
+ }
1832
+
1833
+ template <typename Char>
1834
+ auto get_id(basic_string_view<Char> name) const -> int {
1835
+ if (!has_named_args()) return -1;
1836
+ const auto& named_args =
1837
+ (is_packed() ? values_[-1] : args_[-1].value_).named_args;
1838
+ for (size_t i = 0; i < named_args.size; ++i) {
1839
+ if (named_args.data[i].name == name) return named_args.data[i].id;
1840
+ }
1841
+ return -1;
1842
+ }
1843
+
1844
+ auto max_size() const -> int {
1845
+ unsigned long long max_packed = detail::max_packed_args;
1846
+ return static_cast<int>(is_packed() ? max_packed
1847
+ : desc_ & ~detail::is_unpacked_bit);
1848
+ }
1849
+ };
1850
+
1851
+ /** An alias to ``basic_format_args<format_context>``. */
1852
+ // A separate type would result in shorter symbols but break ABI compatibility
1853
+ // between clang and gcc on ARM (#1919).
1854
+ using format_args = basic_format_args<format_context>;
1855
+
1856
+ // We cannot use enum classes as bit fields because of a gcc bug
1857
+ // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61414.
1858
+ namespace align {
1859
+ enum type { none, left, right, center, numeric };
1860
+ }
1861
+ using align_t = align::type;
1862
+ namespace sign {
1863
+ enum type { none, minus, plus, space };
1864
+ }
1865
+ using sign_t = sign::type;
1866
+
1867
+ FMT_BEGIN_DETAIL_NAMESPACE
1868
+
1869
+ void throw_format_error(const char* message);
1870
+
1871
+ // Workaround an array initialization issue in gcc 4.8.
1872
+ template <typename Char> struct fill_t {
1873
+ private:
1874
+ enum { max_size = 4 };
1875
+ Char data_[max_size] = {Char(' '), Char(0), Char(0), Char(0)};
1876
+ unsigned char size_ = 1;
1877
+
1878
+ public:
1879
+ FMT_CONSTEXPR void operator=(basic_string_view<Char> s) {
1880
+ auto size = s.size();
1881
+ if (size > max_size) return throw_format_error("invalid fill");
1882
+ for (size_t i = 0; i < size; ++i) data_[i] = s[i];
1883
+ size_ = static_cast<unsigned char>(size);
1884
+ }
1885
+
1886
+ constexpr auto size() const -> size_t { return size_; }
1887
+ constexpr auto data() const -> const Char* { return data_; }
1888
+
1889
+ FMT_CONSTEXPR auto operator[](size_t index) -> Char& { return data_[index]; }
1890
+ FMT_CONSTEXPR auto operator[](size_t index) const -> const Char& {
1891
+ return data_[index];
1892
+ }
1893
+ };
1894
+ FMT_END_DETAIL_NAMESPACE
1895
+
1896
+ // Format specifiers for built-in and string types.
1897
+ template <typename Char> struct basic_format_specs {
1898
+ int width;
1899
+ int precision;
1900
+ char type;
1901
+ align_t align : 4;
1902
+ sign_t sign : 3;
1903
+ bool alt : 1; // Alternate form ('#').
1904
+ bool localized : 1;
1905
+ detail::fill_t<Char> fill;
1906
+
1907
+ constexpr basic_format_specs()
1908
+ : width(0),
1909
+ precision(-1),
1910
+ type(0),
1911
+ align(align::none),
1912
+ sign(sign::none),
1913
+ alt(false),
1914
+ localized(false) {}
1915
+ };
1916
+
1917
+ using format_specs = basic_format_specs<char>;
1918
+
1919
+ FMT_BEGIN_DETAIL_NAMESPACE
1920
+
1921
+ enum class arg_id_kind { none, index, name };
1922
+
1923
+ // An argument reference.
1924
+ template <typename Char> struct arg_ref {
1925
+ FMT_CONSTEXPR arg_ref() : kind(arg_id_kind::none), val() {}
1926
+
1927
+ FMT_CONSTEXPR explicit arg_ref(int index)
1928
+ : kind(arg_id_kind::index), val(index) {}
1929
+ FMT_CONSTEXPR explicit arg_ref(basic_string_view<Char> name)
1930
+ : kind(arg_id_kind::name), val(name) {}
1931
+
1932
+ FMT_CONSTEXPR auto operator=(int idx) -> arg_ref& {
1933
+ kind = arg_id_kind::index;
1934
+ val.index = idx;
1935
+ return *this;
1936
+ }
1937
+
1938
+ arg_id_kind kind;
1939
+ union value {
1940
+ FMT_CONSTEXPR value(int id = 0) : index{id} {}
1941
+ FMT_CONSTEXPR value(basic_string_view<Char> n) : name(n) {}
1942
+
1943
+ int index;
1944
+ basic_string_view<Char> name;
1945
+ } val;
1946
+ };
1947
+
1948
+ // Format specifiers with width and precision resolved at formatting rather
1949
+ // than parsing time to allow re-using the same parsed specifiers with
1950
+ // different sets of arguments (precompilation of format strings).
1951
+ template <typename Char>
1952
+ struct dynamic_format_specs : basic_format_specs<Char> {
1953
+ arg_ref<Char> width_ref;
1954
+ arg_ref<Char> precision_ref;
1955
+ };
1956
+
1957
+ struct auto_id {};
1958
+
1959
+ // A format specifier handler that sets fields in basic_format_specs.
1960
+ template <typename Char> class specs_setter {
1961
+ protected:
1962
+ basic_format_specs<Char>& specs_;
1963
+
1964
+ public:
1965
+ explicit FMT_CONSTEXPR specs_setter(basic_format_specs<Char>& specs)
1966
+ : specs_(specs) {}
1967
+
1968
+ FMT_CONSTEXPR specs_setter(const specs_setter& other)
1969
+ : specs_(other.specs_) {}
1970
+
1971
+ FMT_CONSTEXPR void on_align(align_t align) { specs_.align = align; }
1972
+ FMT_CONSTEXPR void on_fill(basic_string_view<Char> fill) {
1973
+ specs_.fill = fill;
1974
+ }
1975
+ FMT_CONSTEXPR void on_sign(sign_t s) { specs_.sign = s; }
1976
+ FMT_CONSTEXPR void on_hash() { specs_.alt = true; }
1977
+ FMT_CONSTEXPR void on_localized() { specs_.localized = true; }
1978
+
1979
+ FMT_CONSTEXPR void on_zero() {
1980
+ if (specs_.align == align::none) specs_.align = align::numeric;
1981
+ specs_.fill[0] = Char('0');
1982
+ }
1983
+
1984
+ FMT_CONSTEXPR void on_width(int width) { specs_.width = width; }
1985
+ FMT_CONSTEXPR void on_precision(int precision) {
1986
+ specs_.precision = precision;
1987
+ }
1988
+ FMT_CONSTEXPR void end_precision() {}
1989
+
1990
+ FMT_CONSTEXPR void on_type(Char type) {
1991
+ specs_.type = static_cast<char>(type);
1992
+ }
1993
+ };
1994
+
1995
+ // Format spec handler that saves references to arguments representing dynamic
1996
+ // width and precision to be resolved at formatting time.
1997
+ template <typename ParseContext>
1998
+ class dynamic_specs_handler
1999
+ : public specs_setter<typename ParseContext::char_type> {
2000
+ public:
2001
+ using char_type = typename ParseContext::char_type;
2002
+
2003
+ FMT_CONSTEXPR dynamic_specs_handler(dynamic_format_specs<char_type>& specs,
2004
+ ParseContext& ctx)
2005
+ : specs_setter<char_type>(specs), specs_(specs), context_(ctx) {}
2006
+
2007
+ FMT_CONSTEXPR dynamic_specs_handler(const dynamic_specs_handler& other)
2008
+ : specs_setter<char_type>(other),
2009
+ specs_(other.specs_),
2010
+ context_(other.context_) {}
2011
+
2012
+ template <typename Id> FMT_CONSTEXPR void on_dynamic_width(Id arg_id) {
2013
+ specs_.width_ref = make_arg_ref(arg_id);
2014
+ }
2015
+
2016
+ template <typename Id> FMT_CONSTEXPR void on_dynamic_precision(Id arg_id) {
2017
+ specs_.precision_ref = make_arg_ref(arg_id);
2018
+ }
2019
+
2020
+ FMT_CONSTEXPR void on_error(const char* message) {
2021
+ context_.on_error(message);
2022
+ }
2023
+
2024
+ private:
2025
+ dynamic_format_specs<char_type>& specs_;
2026
+ ParseContext& context_;
2027
+
2028
+ using arg_ref_type = arg_ref<char_type>;
2029
+
2030
+ FMT_CONSTEXPR auto make_arg_ref(int arg_id) -> arg_ref_type {
2031
+ context_.check_arg_id(arg_id);
2032
+ return arg_ref_type(arg_id);
2033
+ }
2034
+
2035
+ FMT_CONSTEXPR auto make_arg_ref(auto_id) -> arg_ref_type {
2036
+ return arg_ref_type(context_.next_arg_id());
2037
+ }
2038
+
2039
+ FMT_CONSTEXPR auto make_arg_ref(basic_string_view<char_type> arg_id)
2040
+ -> arg_ref_type {
2041
+ context_.check_arg_id(arg_id);
2042
+ basic_string_view<char_type> format_str(
2043
+ context_.begin(), to_unsigned(context_.end() - context_.begin()));
2044
+ return arg_ref_type(arg_id);
2045
+ }
2046
+ };
2047
+
2048
+ template <typename Char> constexpr bool is_ascii_letter(Char c) {
2049
+ return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
2050
+ }
2051
+
2052
+ // Converts a character to ASCII. Returns a number > 127 on conversion failure.
2053
+ template <typename Char, FMT_ENABLE_IF(std::is_integral<Char>::value)>
2054
+ constexpr auto to_ascii(Char value) -> Char {
2055
+ return value;
2056
+ }
2057
+ template <typename Char, FMT_ENABLE_IF(std::is_enum<Char>::value)>
2058
+ constexpr auto to_ascii(Char value) ->
2059
+ typename std::underlying_type<Char>::type {
2060
+ return value;
2061
+ }
2062
+
2063
+ template <typename Char>
2064
+ FMT_CONSTEXPR auto code_point_length(const Char* begin) -> int {
2065
+ if (const_check(sizeof(Char) != 1)) return 1;
2066
+ constexpr char lengths[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2067
+ 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 3, 3, 4, 0};
2068
+ int len = lengths[static_cast<unsigned char>(*begin) >> 3];
2069
+
2070
+ // Compute the pointer to the next character early so that the next
2071
+ // iteration can start working on the next character. Neither Clang
2072
+ // nor GCC figure out this reordering on their own.
2073
+ return len + !len;
2074
+ }
2075
+
2076
+ // Return the result via the out param to workaround gcc bug 77539.
2077
+ template <bool IS_CONSTEXPR, typename T, typename Ptr = const T*>
2078
+ FMT_CONSTEXPR auto find(Ptr first, Ptr last, T value, Ptr& out) -> bool {
2079
+ for (out = first; out != last; ++out) {
2080
+ if (*out == value) return true;
2081
+ }
2082
+ return false;
2083
+ }
2084
+
2085
+ template <>
2086
+ inline auto find<false, char>(const char* first, const char* last, char value,
2087
+ const char*& out) -> bool {
2088
+ out = static_cast<const char*>(
2089
+ std::memchr(first, value, to_unsigned(last - first)));
2090
+ return out != nullptr;
2091
+ }
2092
+
2093
+ // Parses the range [begin, end) as an unsigned integer. This function assumes
2094
+ // that the range is non-empty and the first character is a digit.
2095
+ template <typename Char>
2096
+ FMT_CONSTEXPR auto parse_nonnegative_int(const Char*& begin, const Char* end,
2097
+ int error_value) noexcept -> int {
2098
+ FMT_ASSERT(begin != end && '0' <= *begin && *begin <= '9', "");
2099
+ unsigned value = 0, prev = 0;
2100
+ auto p = begin;
2101
+ do {
2102
+ prev = value;
2103
+ value = value * 10 + unsigned(*p - '0');
2104
+ ++p;
2105
+ } while (p != end && '0' <= *p && *p <= '9');
2106
+ auto num_digits = p - begin;
2107
+ begin = p;
2108
+ if (num_digits <= std::numeric_limits<int>::digits10)
2109
+ return static_cast<int>(value);
2110
+ // Check for overflow.
2111
+ const unsigned max = to_unsigned((std::numeric_limits<int>::max)());
2112
+ return num_digits == std::numeric_limits<int>::digits10 + 1 &&
2113
+ prev * 10ull + unsigned(p[-1] - '0') <= max
2114
+ ? static_cast<int>(value)
2115
+ : error_value;
2116
+ }
2117
+
2118
+ // Parses fill and alignment.
2119
+ template <typename Char, typename Handler>
2120
+ FMT_CONSTEXPR auto parse_align(const Char* begin, const Char* end,
2121
+ Handler&& handler) -> const Char* {
2122
+ FMT_ASSERT(begin != end, "");
2123
+ auto align = align::none;
2124
+ auto p = begin + code_point_length(begin);
2125
+ if (p >= end) p = begin;
2126
+ for (;;) {
2127
+ switch (to_ascii(*p)) {
2128
+ case '<':
2129
+ align = align::left;
2130
+ break;
2131
+ case '>':
2132
+ align = align::right;
2133
+ break;
2134
+ case '^':
2135
+ align = align::center;
2136
+ break;
2137
+ default:
2138
+ break;
2139
+ }
2140
+ if (align != align::none) {
2141
+ if (p != begin) {
2142
+ auto c = *begin;
2143
+ if (c == '{')
2144
+ return handler.on_error("invalid fill character '{'"), begin;
2145
+ handler.on_fill(basic_string_view<Char>(begin, to_unsigned(p - begin)));
2146
+ begin = p + 1;
2147
+ } else
2148
+ ++begin;
2149
+ handler.on_align(align);
2150
+ break;
2151
+ } else if (p == begin) {
2152
+ break;
2153
+ }
2154
+ p = begin;
2155
+ }
2156
+ return begin;
2157
+ }
2158
+
2159
+ template <typename Char> FMT_CONSTEXPR bool is_name_start(Char c) {
2160
+ return ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || '_' == c;
2161
+ }
2162
+
2163
+ template <typename Char, typename IDHandler>
2164
+ FMT_CONSTEXPR auto do_parse_arg_id(const Char* begin, const Char* end,
2165
+ IDHandler&& handler) -> const Char* {
2166
+ FMT_ASSERT(begin != end, "");
2167
+ Char c = *begin;
2168
+ if (c >= '0' && c <= '9') {
2169
+ int index = 0;
2170
+ if (c != '0')
2171
+ index =
2172
+ parse_nonnegative_int(begin, end, (std::numeric_limits<int>::max)());
2173
+ else
2174
+ ++begin;
2175
+ if (begin == end || (*begin != '}' && *begin != ':'))
2176
+ handler.on_error("invalid format string");
2177
+ else
2178
+ handler(index);
2179
+ return begin;
2180
+ }
2181
+ if (!is_name_start(c)) {
2182
+ handler.on_error("invalid format string");
2183
+ return begin;
2184
+ }
2185
+ auto it = begin;
2186
+ do {
2187
+ ++it;
2188
+ } while (it != end && (is_name_start(c = *it) || ('0' <= c && c <= '9')));
2189
+ handler(basic_string_view<Char>(begin, to_unsigned(it - begin)));
2190
+ return it;
2191
+ }
2192
+
2193
+ template <typename Char, typename IDHandler>
2194
+ FMT_CONSTEXPR FMT_INLINE auto parse_arg_id(const Char* begin, const Char* end,
2195
+ IDHandler&& handler) -> const Char* {
2196
+ Char c = *begin;
2197
+ if (c != '}' && c != ':') return do_parse_arg_id(begin, end, handler);
2198
+ handler();
2199
+ return begin;
2200
+ }
2201
+
2202
+ template <typename Char, typename Handler>
2203
+ FMT_CONSTEXPR auto parse_width(const Char* begin, const Char* end,
2204
+ Handler&& handler) -> const Char* {
2205
+ using detail::auto_id;
2206
+ struct width_adapter {
2207
+ Handler& handler;
2208
+
2209
+ FMT_CONSTEXPR void operator()() { handler.on_dynamic_width(auto_id()); }
2210
+ FMT_CONSTEXPR void operator()(int id) { handler.on_dynamic_width(id); }
2211
+ FMT_CONSTEXPR void operator()(basic_string_view<Char> id) {
2212
+ handler.on_dynamic_width(id);
2213
+ }
2214
+ FMT_CONSTEXPR void on_error(const char* message) {
2215
+ if (message) handler.on_error(message);
2216
+ }
2217
+ };
2218
+
2219
+ FMT_ASSERT(begin != end, "");
2220
+ if ('0' <= *begin && *begin <= '9') {
2221
+ int width = parse_nonnegative_int(begin, end, -1);
2222
+ if (width != -1)
2223
+ handler.on_width(width);
2224
+ else
2225
+ handler.on_error("number is too big");
2226
+ } else if (*begin == '{') {
2227
+ ++begin;
2228
+ if (begin != end) begin = parse_arg_id(begin, end, width_adapter{handler});
2229
+ if (begin == end || *begin != '}')
2230
+ return handler.on_error("invalid format string"), begin;
2231
+ ++begin;
2232
+ }
2233
+ return begin;
2234
+ }
2235
+
2236
+ template <typename Char, typename Handler>
2237
+ FMT_CONSTEXPR auto parse_precision(const Char* begin, const Char* end,
2238
+ Handler&& handler) -> const Char* {
2239
+ using detail::auto_id;
2240
+ struct precision_adapter {
2241
+ Handler& handler;
2242
+
2243
+ FMT_CONSTEXPR void operator()() { handler.on_dynamic_precision(auto_id()); }
2244
+ FMT_CONSTEXPR void operator()(int id) { handler.on_dynamic_precision(id); }
2245
+ FMT_CONSTEXPR void operator()(basic_string_view<Char> id) {
2246
+ handler.on_dynamic_precision(id);
2247
+ }
2248
+ FMT_CONSTEXPR void on_error(const char* message) {
2249
+ if (message) handler.on_error(message);
2250
+ }
2251
+ };
2252
+
2253
+ ++begin;
2254
+ auto c = begin != end ? *begin : Char();
2255
+ if ('0' <= c && c <= '9') {
2256
+ auto precision = parse_nonnegative_int(begin, end, -1);
2257
+ if (precision != -1)
2258
+ handler.on_precision(precision);
2259
+ else
2260
+ handler.on_error("number is too big");
2261
+ } else if (c == '{') {
2262
+ ++begin;
2263
+ if (begin != end)
2264
+ begin = parse_arg_id(begin, end, precision_adapter{handler});
2265
+ if (begin == end || *begin++ != '}')
2266
+ return handler.on_error("invalid format string"), begin;
2267
+ } else {
2268
+ return handler.on_error("missing precision specifier"), begin;
2269
+ }
2270
+ handler.end_precision();
2271
+ return begin;
2272
+ }
2273
+
2274
+ // Parses standard format specifiers and sends notifications about parsed
2275
+ // components to handler.
2276
+ template <typename Char, typename SpecHandler>
2277
+ FMT_CONSTEXPR FMT_INLINE auto parse_format_specs(const Char* begin,
2278
+ const Char* end,
2279
+ SpecHandler&& handler)
2280
+ -> const Char* {
2281
+ if (begin + 1 < end && begin[1] == '}' && is_ascii_letter(*begin) &&
2282
+ *begin != 'L') {
2283
+ handler.on_type(*begin++);
2284
+ return begin;
2285
+ }
2286
+
2287
+ if (begin == end) return begin;
2288
+
2289
+ begin = parse_align(begin, end, handler);
2290
+ if (begin == end) return begin;
2291
+
2292
+ // Parse sign.
2293
+ switch (to_ascii(*begin)) {
2294
+ case '+':
2295
+ handler.on_sign(sign::plus);
2296
+ ++begin;
2297
+ break;
2298
+ case '-':
2299
+ handler.on_sign(sign::minus);
2300
+ ++begin;
2301
+ break;
2302
+ case ' ':
2303
+ handler.on_sign(sign::space);
2304
+ ++begin;
2305
+ break;
2306
+ default:
2307
+ break;
2308
+ }
2309
+ if (begin == end) return begin;
2310
+
2311
+ if (*begin == '#') {
2312
+ handler.on_hash();
2313
+ if (++begin == end) return begin;
2314
+ }
2315
+
2316
+ // Parse zero flag.
2317
+ if (*begin == '0') {
2318
+ handler.on_zero();
2319
+ if (++begin == end) return begin;
2320
+ }
2321
+
2322
+ begin = parse_width(begin, end, handler);
2323
+ if (begin == end) return begin;
2324
+
2325
+ // Parse precision.
2326
+ if (*begin == '.') {
2327
+ begin = parse_precision(begin, end, handler);
2328
+ if (begin == end) return begin;
2329
+ }
2330
+
2331
+ if (*begin == 'L') {
2332
+ handler.on_localized();
2333
+ ++begin;
2334
+ }
2335
+
2336
+ // Parse type.
2337
+ if (begin != end && *begin != '}') handler.on_type(*begin++);
2338
+ return begin;
2339
+ }
2340
+
2341
+ template <typename Char, typename Handler>
2342
+ FMT_CONSTEXPR auto parse_replacement_field(const Char* begin, const Char* end,
2343
+ Handler&& handler) -> const Char* {
2344
+ struct id_adapter {
2345
+ Handler& handler;
2346
+ int arg_id;
2347
+
2348
+ FMT_CONSTEXPR void operator()() { arg_id = handler.on_arg_id(); }
2349
+ FMT_CONSTEXPR void operator()(int id) { arg_id = handler.on_arg_id(id); }
2350
+ FMT_CONSTEXPR void operator()(basic_string_view<Char> id) {
2351
+ arg_id = handler.on_arg_id(id);
2352
+ }
2353
+ FMT_CONSTEXPR void on_error(const char* message) {
2354
+ if (message) handler.on_error(message);
2355
+ }
2356
+ };
2357
+
2358
+ ++begin;
2359
+ if (begin == end) return handler.on_error("invalid format string"), end;
2360
+ if (*begin == '}') {
2361
+ handler.on_replacement_field(handler.on_arg_id(), begin);
2362
+ } else if (*begin == '{') {
2363
+ handler.on_text(begin, begin + 1);
2364
+ } else {
2365
+ auto adapter = id_adapter{handler, 0};
2366
+ begin = parse_arg_id(begin, end, adapter);
2367
+ Char c = begin != end ? *begin : Char();
2368
+ if (c == '}') {
2369
+ handler.on_replacement_field(adapter.arg_id, begin);
2370
+ } else if (c == ':') {
2371
+ begin = handler.on_format_specs(adapter.arg_id, begin + 1, end);
2372
+ if (begin == end || *begin != '}')
2373
+ return handler.on_error("unknown format specifier"), end;
2374
+ } else {
2375
+ return handler.on_error("missing '}' in format string"), end;
2376
+ }
2377
+ }
2378
+ return begin + 1;
2379
+ }
2380
+
2381
+ template <bool IS_CONSTEXPR, typename Char, typename Handler>
2382
+ FMT_CONSTEXPR FMT_INLINE void parse_format_string(
2383
+ basic_string_view<Char> format_str, Handler&& handler) {
2384
+ // this is most likely a name-lookup defect in msvc's modules implementation
2385
+ using detail::find;
2386
+
2387
+ auto begin = format_str.data();
2388
+ auto end = begin + format_str.size();
2389
+ if (end - begin < 32) {
2390
+ // Use a simple loop instead of memchr for small strings.
2391
+ const Char* p = begin;
2392
+ while (p != end) {
2393
+ auto c = *p++;
2394
+ if (c == '{') {
2395
+ handler.on_text(begin, p - 1);
2396
+ begin = p = parse_replacement_field(p - 1, end, handler);
2397
+ } else if (c == '}') {
2398
+ if (p == end || *p != '}')
2399
+ return handler.on_error("unmatched '}' in format string");
2400
+ handler.on_text(begin, p);
2401
+ begin = ++p;
2402
+ }
2403
+ }
2404
+ handler.on_text(begin, end);
2405
+ return;
2406
+ }
2407
+ struct writer {
2408
+ FMT_CONSTEXPR void operator()(const Char* pbegin, const Char* pend) {
2409
+ if (pbegin == pend) return;
2410
+ for (;;) {
2411
+ const Char* p = nullptr;
2412
+ if (!find<IS_CONSTEXPR>(pbegin, pend, Char('}'), p))
2413
+ return handler_.on_text(pbegin, pend);
2414
+ ++p;
2415
+ if (p == pend || *p != '}')
2416
+ return handler_.on_error("unmatched '}' in format string");
2417
+ handler_.on_text(pbegin, p);
2418
+ pbegin = p + 1;
2419
+ }
2420
+ }
2421
+ Handler& handler_;
2422
+ } write{handler};
2423
+ while (begin != end) {
2424
+ // Doing two passes with memchr (one for '{' and another for '}') is up to
2425
+ // 2.5x faster than the naive one-pass implementation on big format strings.
2426
+ const Char* p = begin;
2427
+ if (*begin != '{' && !find<IS_CONSTEXPR>(begin + 1, end, Char('{'), p))
2428
+ return write(begin, end);
2429
+ write(begin, p);
2430
+ begin = parse_replacement_field(p, end, handler);
2431
+ }
2432
+ }
2433
+
2434
+ template <typename T, typename ParseContext>
2435
+ FMT_CONSTEXPR auto parse_format_specs(ParseContext& ctx)
2436
+ -> decltype(ctx.begin()) {
2437
+ using char_type = typename ParseContext::char_type;
2438
+ using context = buffer_context<char_type>;
2439
+ using mapped_type = conditional_t<
2440
+ mapped_type_constant<T, context>::value != type::custom_type,
2441
+ decltype(arg_mapper<context>().map(std::declval<const T&>())), T>;
2442
+ auto f = conditional_t<has_formatter<mapped_type, context>::value,
2443
+ formatter<mapped_type, char_type>,
2444
+ fallback_formatter<T, char_type>>();
2445
+ return f.parse(ctx);
2446
+ }
2447
+
2448
+ // A parse context with extra argument id checks. It is only used at compile
2449
+ // time because adding checks at runtime would introduce substantial overhead
2450
+ // and would be redundant since argument ids are checked when arguments are
2451
+ // retrieved anyway.
2452
+ template <typename Char, typename ErrorHandler = error_handler>
2453
+ class compile_parse_context
2454
+ : public basic_format_parse_context<Char, ErrorHandler> {
2455
+ private:
2456
+ int num_args_;
2457
+ using base = basic_format_parse_context<Char, ErrorHandler>;
2458
+
2459
+ public:
2460
+ explicit FMT_CONSTEXPR compile_parse_context(
2461
+ basic_string_view<Char> format_str,
2462
+ int num_args = (std::numeric_limits<int>::max)(), ErrorHandler eh = {})
2463
+ : base(format_str, eh), num_args_(num_args) {}
2464
+
2465
+ FMT_CONSTEXPR auto next_arg_id() -> int {
2466
+ int id = base::next_arg_id();
2467
+ if (id >= num_args_) this->on_error("argument not found");
2468
+ return id;
2469
+ }
2470
+
2471
+ FMT_CONSTEXPR void check_arg_id(int id) {
2472
+ base::check_arg_id(id);
2473
+ if (id >= num_args_) this->on_error("argument not found");
2474
+ }
2475
+ using base::check_arg_id;
2476
+ };
2477
+
2478
+ template <typename ErrorHandler>
2479
+ FMT_CONSTEXPR void check_int_type_spec(char spec, ErrorHandler&& eh) {
2480
+ switch (spec) {
2481
+ case 0:
2482
+ case 'd':
2483
+ case 'x':
2484
+ case 'X':
2485
+ case 'b':
2486
+ case 'B':
2487
+ case 'o':
2488
+ case 'c':
2489
+ break;
2490
+ default:
2491
+ eh.on_error("invalid type specifier");
2492
+ break;
2493
+ }
2494
+ }
2495
+
2496
+ // Checks char specs and returns true if the type spec is char (and not int).
2497
+ template <typename Char, typename ErrorHandler = error_handler>
2498
+ FMT_CONSTEXPR auto check_char_specs(const basic_format_specs<Char>& specs,
2499
+ ErrorHandler&& eh = {}) -> bool {
2500
+ if (specs.type && specs.type != 'c') {
2501
+ check_int_type_spec(specs.type, eh);
2502
+ return false;
2503
+ }
2504
+ if (specs.align == align::numeric || specs.sign != sign::none || specs.alt)
2505
+ eh.on_error("invalid format specifier for char");
2506
+ return true;
2507
+ }
2508
+
2509
+ // A floating-point presentation format.
2510
+ enum class float_format : unsigned char {
2511
+ general, // General: exponent notation or fixed point based on magnitude.
2512
+ exp, // Exponent notation with the default precision of 6, e.g. 1.2e-3.
2513
+ fixed, // Fixed point with the default precision of 6, e.g. 0.0012.
2514
+ hex
2515
+ };
2516
+
2517
+ struct float_specs {
2518
+ int precision;
2519
+ float_format format : 8;
2520
+ sign_t sign : 8;
2521
+ bool upper : 1;
2522
+ bool locale : 1;
2523
+ bool binary32 : 1;
2524
+ bool use_grisu : 1;
2525
+ bool showpoint : 1;
2526
+ };
2527
+
2528
+ template <typename ErrorHandler = error_handler, typename Char>
2529
+ FMT_CONSTEXPR auto parse_float_type_spec(const basic_format_specs<Char>& specs,
2530
+ ErrorHandler&& eh = {})
2531
+ -> float_specs {
2532
+ auto result = float_specs();
2533
+ result.showpoint = specs.alt;
2534
+ result.locale = specs.localized;
2535
+ switch (specs.type) {
2536
+ case 0:
2537
+ result.format = float_format::general;
2538
+ break;
2539
+ case 'G':
2540
+ result.upper = true;
2541
+ FMT_FALLTHROUGH;
2542
+ case 'g':
2543
+ result.format = float_format::general;
2544
+ break;
2545
+ case 'E':
2546
+ result.upper = true;
2547
+ FMT_FALLTHROUGH;
2548
+ case 'e':
2549
+ result.format = float_format::exp;
2550
+ result.showpoint |= specs.precision != 0;
2551
+ break;
2552
+ case 'F':
2553
+ result.upper = true;
2554
+ FMT_FALLTHROUGH;
2555
+ case 'f':
2556
+ result.format = float_format::fixed;
2557
+ result.showpoint |= specs.precision != 0;
2558
+ break;
2559
+ case 'A':
2560
+ result.upper = true;
2561
+ FMT_FALLTHROUGH;
2562
+ case 'a':
2563
+ result.format = float_format::hex;
2564
+ break;
2565
+ default:
2566
+ eh.on_error("invalid type specifier");
2567
+ break;
2568
+ }
2569
+ return result;
2570
+ }
2571
+
2572
+ template <typename Char, typename ErrorHandler = error_handler>
2573
+ FMT_CONSTEXPR auto check_cstring_type_spec(Char spec, ErrorHandler&& eh = {})
2574
+ -> bool {
2575
+ if (spec == 0 || spec == 's') return true;
2576
+ if (spec != 'p') eh.on_error("invalid type specifier");
2577
+ return false;
2578
+ }
2579
+
2580
+ template <typename Char, typename ErrorHandler = error_handler>
2581
+ FMT_CONSTEXPR void check_string_type_spec(Char spec, ErrorHandler&& eh = {}) {
2582
+ if (spec != 0 && spec != 's') eh.on_error("invalid type specifier");
2583
+ }
2584
+
2585
+ template <typename Char, typename ErrorHandler>
2586
+ FMT_CONSTEXPR void check_pointer_type_spec(Char spec, ErrorHandler&& eh) {
2587
+ if (spec != 0 && spec != 'p') eh.on_error("invalid type specifier");
2588
+ }
2589
+
2590
+ // A parse_format_specs handler that checks if specifiers are consistent with
2591
+ // the argument type.
2592
+ template <typename Handler> class specs_checker : public Handler {
2593
+ private:
2594
+ detail::type arg_type_;
2595
+
2596
+ FMT_CONSTEXPR void require_numeric_argument() {
2597
+ if (!is_arithmetic_type(arg_type_))
2598
+ this->on_error("format specifier requires numeric argument");
2599
+ }
2600
+
2601
+ public:
2602
+ FMT_CONSTEXPR specs_checker(const Handler& handler, detail::type arg_type)
2603
+ : Handler(handler), arg_type_(arg_type) {}
2604
+
2605
+ FMT_CONSTEXPR void on_align(align_t align) {
2606
+ if (align == align::numeric) require_numeric_argument();
2607
+ Handler::on_align(align);
2608
+ }
2609
+
2610
+ FMT_CONSTEXPR void on_sign(sign_t s) {
2611
+ require_numeric_argument();
2612
+ if (is_integral_type(arg_type_) && arg_type_ != type::int_type &&
2613
+ arg_type_ != type::long_long_type && arg_type_ != type::char_type) {
2614
+ this->on_error("format specifier requires signed argument");
2615
+ }
2616
+ Handler::on_sign(s);
2617
+ }
2618
+
2619
+ FMT_CONSTEXPR void on_hash() {
2620
+ require_numeric_argument();
2621
+ Handler::on_hash();
2622
+ }
2623
+
2624
+ FMT_CONSTEXPR void on_localized() {
2625
+ require_numeric_argument();
2626
+ Handler::on_localized();
2627
+ }
2628
+
2629
+ FMT_CONSTEXPR void on_zero() {
2630
+ require_numeric_argument();
2631
+ Handler::on_zero();
2632
+ }
2633
+
2634
+ FMT_CONSTEXPR void end_precision() {
2635
+ if (is_integral_type(arg_type_) || arg_type_ == type::pointer_type)
2636
+ this->on_error("precision not allowed for this argument type");
2637
+ }
2638
+ };
2639
+
2640
+ constexpr int invalid_arg_index = -1;
2641
+
2642
+ #if FMT_USE_NONTYPE_TEMPLATE_PARAMETERS
2643
+ template <int N, typename T, typename... Args, typename Char>
2644
+ constexpr auto get_arg_index_by_name(basic_string_view<Char> name) -> int {
2645
+ if constexpr (detail::is_statically_named_arg<T>()) {
2646
+ if (name == T::name) return N;
2647
+ }
2648
+ if constexpr (sizeof...(Args) > 0) {
2649
+ return get_arg_index_by_name<N + 1, Args...>(name);
2650
+ } else {
2651
+ (void)name; // Workaround an MSVC bug about "unused" parameter.
2652
+ return invalid_arg_index;
2653
+ }
2654
+ }
2655
+ #endif
2656
+
2657
+ template <typename... Args, typename Char>
2658
+ FMT_CONSTEXPR auto get_arg_index_by_name(basic_string_view<Char> name) -> int {
2659
+ #if FMT_USE_NONTYPE_TEMPLATE_PARAMETERS
2660
+ if constexpr (sizeof...(Args) > 0) {
2661
+ return get_arg_index_by_name<0, Args...>(name);
2662
+ } else {
2663
+ (void)name;
2664
+ return invalid_arg_index;
2665
+ }
2666
+ #else
2667
+ (void)name;
2668
+ return invalid_arg_index;
2669
+ #endif
2670
+ }
2671
+
2672
+ template <typename Char, typename ErrorHandler, typename... Args>
2673
+ class format_string_checker {
2674
+ private:
2675
+ using parse_context_type = compile_parse_context<Char, ErrorHandler>;
2676
+ enum { num_args = sizeof...(Args) };
2677
+
2678
+ // Format specifier parsing function.
2679
+ using parse_func = const Char* (*)(parse_context_type&);
2680
+
2681
+ parse_context_type context_;
2682
+ parse_func parse_funcs_[num_args > 0 ? num_args : 1];
2683
+
2684
+ public:
2685
+ explicit FMT_CONSTEXPR format_string_checker(
2686
+ basic_string_view<Char> format_str, ErrorHandler eh)
2687
+ : context_(format_str, num_args, eh),
2688
+ parse_funcs_{&parse_format_specs<Args, parse_context_type>...} {}
2689
+
2690
+ FMT_CONSTEXPR void on_text(const Char*, const Char*) {}
2691
+
2692
+ FMT_CONSTEXPR auto on_arg_id() -> int { return context_.next_arg_id(); }
2693
+ FMT_CONSTEXPR auto on_arg_id(int id) -> int {
2694
+ return context_.check_arg_id(id), id;
2695
+ }
2696
+ FMT_CONSTEXPR auto on_arg_id(basic_string_view<Char> id) -> int {
2697
+ #if FMT_USE_NONTYPE_TEMPLATE_PARAMETERS
2698
+ auto index = get_arg_index_by_name<Args...>(id);
2699
+ if (index == invalid_arg_index) on_error("named argument is not found");
2700
+ return context_.check_arg_id(index), index;
2701
+ #else
2702
+ (void)id;
2703
+ on_error("compile-time checks for named arguments require C++20 support");
2704
+ return 0;
2705
+ #endif
2706
+ }
2707
+
2708
+ FMT_CONSTEXPR void on_replacement_field(int, const Char*) {}
2709
+
2710
+ FMT_CONSTEXPR auto on_format_specs(int id, const Char* begin, const Char*)
2711
+ -> const Char* {
2712
+ context_.advance_to(context_.begin() + (begin - &*context_.begin()));
2713
+ // id >= 0 check is a workaround for gcc 10 bug (#2065).
2714
+ return id >= 0 && id < num_args ? parse_funcs_[id](context_) : begin;
2715
+ }
2716
+
2717
+ FMT_CONSTEXPR void on_error(const char* message) {
2718
+ context_.on_error(message);
2719
+ }
2720
+ };
2721
+
2722
+ template <typename... Args, typename S,
2723
+ enable_if_t<(is_compile_string<S>::value), int>>
2724
+ void check_format_string(S format_str) {
2725
+ FMT_CONSTEXPR auto s = to_string_view(format_str);
2726
+ using checker = format_string_checker<typename S::char_type, error_handler,
2727
+ remove_cvref_t<Args>...>;
2728
+ FMT_CONSTEXPR bool invalid_format =
2729
+ (parse_format_string<true>(s, checker(s, {})), true);
2730
+ ignore_unused(invalid_format);
2731
+ }
2732
+
2733
+ template <typename Char>
2734
+ void vformat_to(
2735
+ buffer<Char>& buf, basic_string_view<Char> fmt,
2736
+ basic_format_args<FMT_BUFFER_CONTEXT(type_identity_t<Char>)> args,
2737
+ locale_ref loc = {});
2738
+
2739
+ FMT_API void vprint_mojibake(std::FILE*, string_view, format_args);
2740
+ #ifndef _WIN32
2741
+ inline void vprint_mojibake(std::FILE*, string_view, format_args) {}
2742
+ #endif
2743
+ FMT_END_DETAIL_NAMESPACE
2744
+
2745
+ // A formatter specialization for the core types corresponding to detail::type
2746
+ // constants.
2747
+ template <typename T, typename Char>
2748
+ struct formatter<T, Char,
2749
+ enable_if_t<detail::type_constant<T, Char>::value !=
2750
+ detail::type::custom_type>> {
2751
+ private:
2752
+ detail::dynamic_format_specs<Char> specs_;
2753
+
2754
+ public:
2755
+ // Parses format specifiers stopping either at the end of the range or at the
2756
+ // terminating '}'.
2757
+ template <typename ParseContext>
2758
+ FMT_CONSTEXPR auto parse(ParseContext& ctx) -> decltype(ctx.begin()) {
2759
+ auto begin = ctx.begin(), end = ctx.end();
2760
+ if (begin == end) return begin;
2761
+ using handler_type = detail::dynamic_specs_handler<ParseContext>;
2762
+ auto type = detail::type_constant<T, Char>::value;
2763
+ auto checker =
2764
+ detail::specs_checker<handler_type>(handler_type(specs_, ctx), type);
2765
+ auto it = detail::parse_format_specs(begin, end, checker);
2766
+ auto eh = ctx.error_handler();
2767
+ switch (type) {
2768
+ case detail::type::none_type:
2769
+ FMT_ASSERT(false, "invalid argument type");
2770
+ break;
2771
+ case detail::type::bool_type:
2772
+ if (!specs_.type || specs_.type == 's') break;
2773
+ FMT_FALLTHROUGH;
2774
+ case detail::type::int_type:
2775
+ case detail::type::uint_type:
2776
+ case detail::type::long_long_type:
2777
+ case detail::type::ulong_long_type:
2778
+ case detail::type::int128_type:
2779
+ case detail::type::uint128_type:
2780
+ detail::check_int_type_spec(specs_.type, eh);
2781
+ break;
2782
+ case detail::type::char_type:
2783
+ detail::check_char_specs(specs_, eh);
2784
+ break;
2785
+ case detail::type::float_type:
2786
+ if (detail::const_check(FMT_USE_FLOAT))
2787
+ detail::parse_float_type_spec(specs_, eh);
2788
+ else
2789
+ FMT_ASSERT(false, "float support disabled");
2790
+ break;
2791
+ case detail::type::double_type:
2792
+ if (detail::const_check(FMT_USE_DOUBLE))
2793
+ detail::parse_float_type_spec(specs_, eh);
2794
+ else
2795
+ FMT_ASSERT(false, "double support disabled");
2796
+ break;
2797
+ case detail::type::long_double_type:
2798
+ if (detail::const_check(FMT_USE_LONG_DOUBLE))
2799
+ detail::parse_float_type_spec(specs_, eh);
2800
+ else
2801
+ FMT_ASSERT(false, "long double support disabled");
2802
+ break;
2803
+ case detail::type::cstring_type:
2804
+ detail::check_cstring_type_spec(specs_.type, eh);
2805
+ break;
2806
+ case detail::type::string_type:
2807
+ detail::check_string_type_spec(specs_.type, eh);
2808
+ break;
2809
+ case detail::type::pointer_type:
2810
+ detail::check_pointer_type_spec(specs_.type, eh);
2811
+ break;
2812
+ case detail::type::custom_type:
2813
+ // Custom format specifiers are checked in parse functions of
2814
+ // formatter specializations.
2815
+ break;
2816
+ }
2817
+ return it;
2818
+ }
2819
+
2820
+ template <typename FormatContext>
2821
+ FMT_CONSTEXPR auto format(const T& val, FormatContext& ctx) const
2822
+ -> decltype(ctx.out());
2823
+ };
2824
+
2825
+ template <typename Char> struct basic_runtime { basic_string_view<Char> str; };
2826
+
2827
+ template <typename Char, typename... Args> class basic_format_string {
2828
+ private:
2829
+ basic_string_view<Char> str_;
2830
+
2831
+ public:
2832
+ template <typename S,
2833
+ FMT_ENABLE_IF(
2834
+ std::is_convertible<const S&, basic_string_view<Char>>::value)>
2835
+ FMT_CONSTEVAL basic_format_string(const S& s) : str_(s) {
2836
+ static_assert(
2837
+ detail::count<
2838
+ (std::is_base_of<detail::view, remove_reference_t<Args>>::value &&
2839
+ std::is_reference<Args>::value)...>() == 0,
2840
+ "passing views as lvalues is disallowed");
2841
+ #ifdef FMT_HAS_CONSTEVAL
2842
+ if constexpr (detail::count_named_args<Args...>() == 0) {
2843
+ using checker = detail::format_string_checker<Char, detail::error_handler,
2844
+ remove_cvref_t<Args>...>;
2845
+ detail::parse_format_string<true>(str_, checker(s, {}));
2846
+ }
2847
+ #else
2848
+ detail::check_format_string<Args...>(s);
2849
+ #endif
2850
+ }
2851
+ basic_format_string(basic_runtime<Char> r) : str_(r.str) {}
2852
+
2853
+ FMT_INLINE operator basic_string_view<Char>() const { return str_; }
2854
+ };
2855
+
2856
+ #if FMT_GCC_VERSION && FMT_GCC_VERSION < 409
2857
+ // Workaround broken conversion on older gcc.
2858
+ template <typename... Args> using format_string = string_view;
2859
+ template <typename S> auto runtime(const S& s) -> basic_string_view<char_t<S>> {
2860
+ return s;
2861
+ }
2862
+ #else
2863
+ template <typename... Args>
2864
+ using format_string = basic_format_string<char, type_identity_t<Args>...>;
2865
+ // Creates a runtime format string.
2866
+ template <typename S> auto runtime(const S& s) -> basic_runtime<char_t<S>> {
2867
+ return {{s}};
2868
+ }
2869
+ #endif
2870
+
2871
+ FMT_API auto vformat(string_view fmt, format_args args) -> std::string;
2872
+
2873
+ /**
2874
+ \rst
2875
+ Formats ``args`` according to specifications in ``fmt`` and returns the result
2876
+ as a string.
2877
+
2878
+ **Example**::
2879
+
2880
+ #include <fmt/core.h>
2881
+ std::string message = fmt::format("The answer is {}", 42);
2882
+ \endrst
2883
+ */
2884
+ template <typename... T>
2885
+ FMT_INLINE auto format(format_string<T...> fmt, T&&... args) -> std::string {
2886
+ return vformat(fmt, fmt::make_format_args(args...));
2887
+ }
2888
+
2889
+ /** Formats a string and writes the output to ``out``. */
2890
+ template <typename OutputIt,
2891
+ FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, char>::value)>
2892
+ auto vformat_to(OutputIt out, string_view fmt, format_args args) -> OutputIt {
2893
+ using detail::get_buffer;
2894
+ auto&& buf = get_buffer<char>(out);
2895
+ detail::vformat_to(buf, string_view(fmt), args, {});
2896
+ return detail::get_iterator(buf);
2897
+ }
2898
+
2899
+ /**
2900
+ \rst
2901
+ Formats ``args`` according to specifications in ``fmt``, writes the result to
2902
+ the output iterator ``out`` and returns the iterator past the end of the output
2903
+ range.
2904
+
2905
+ **Example**::
2906
+
2907
+ auto out = std::vector<char>();
2908
+ fmt::format_to(std::back_inserter(out), "{}", 42);
2909
+ \endrst
2910
+ */
2911
+ template <typename OutputIt, typename... T,
2912
+ FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, char>::value)>
2913
+ FMT_INLINE auto format_to(OutputIt out, format_string<T...> fmt, T&&... args)
2914
+ -> OutputIt {
2915
+ return vformat_to(out, fmt, fmt::make_format_args(args...));
2916
+ }
2917
+
2918
+ template <typename OutputIt> struct format_to_n_result {
2919
+ /** Iterator past the end of the output range. */
2920
+ OutputIt out;
2921
+ /** Total (not truncated) output size. */
2922
+ size_t size;
2923
+ };
2924
+
2925
+ template <typename OutputIt, typename... T,
2926
+ FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, char>::value)>
2927
+ auto vformat_to_n(OutputIt out, size_t n, string_view fmt, format_args args)
2928
+ -> format_to_n_result<OutputIt> {
2929
+ using buffer =
2930
+ detail::iterator_buffer<OutputIt, char, detail::fixed_buffer_traits>;
2931
+ auto buf = buffer(out, n);
2932
+ detail::vformat_to(buf, fmt, args, {});
2933
+ return {buf.out(), buf.count()};
2934
+ }
2935
+
2936
+ /**
2937
+ \rst
2938
+ Formats ``args`` according to specifications in ``fmt``, writes up to ``n``
2939
+ characters of the result to the output iterator ``out`` and returns the total
2940
+ (not truncated) output size and the iterator past the end of the output range.
2941
+ \endrst
2942
+ */
2943
+ template <typename OutputIt, typename... T,
2944
+ FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, char>::value)>
2945
+ FMT_INLINE auto format_to_n(OutputIt out, size_t n, format_string<T...> fmt,
2946
+ const T&... args) -> format_to_n_result<OutputIt> {
2947
+ return vformat_to_n(out, n, fmt, fmt::make_format_args(args...));
2948
+ }
2949
+
2950
+ /** Returns the number of chars in the output of ``format(fmt, args...)``. */
2951
+ template <typename... T>
2952
+ FMT_INLINE auto formatted_size(format_string<T...> fmt, T&&... args) -> size_t {
2953
+ auto buf = detail::counting_buffer<>();
2954
+ detail::vformat_to(buf, string_view(fmt), fmt::make_format_args(args...), {});
2955
+ return buf.count();
2956
+ }
2957
+
2958
+ FMT_API void vprint(string_view fmt, format_args args);
2959
+ FMT_API void vprint(std::FILE* f, string_view fmt, format_args args);
2960
+
2961
+ /**
2962
+ \rst
2963
+ Formats ``args`` according to specifications in ``fmt`` and writes the output
2964
+ to ``stdout``.
2965
+
2966
+ **Example**::
2967
+
2968
+ fmt::print("Elapsed time: {0:.2f} seconds", 1.23);
2969
+ \endrst
2970
+ */
2971
+ template <typename... T>
2972
+ FMT_INLINE void print(format_string<T...> fmt, T&&... args) {
2973
+ const auto& vargs = fmt::make_format_args(args...);
2974
+ return detail::is_utf8() ? vprint(fmt, vargs)
2975
+ : detail::vprint_mojibake(stdout, fmt, vargs);
2976
+ }
2977
+
2978
+ /**
2979
+ \rst
2980
+ Formats ``args`` according to specifications in ``fmt`` and writes the
2981
+ output to the file ``f``.
2982
+
2983
+ **Example**::
2984
+
2985
+ fmt::print(stderr, "Don't {}!", "panic");
2986
+ \endrst
2987
+ */
2988
+ template <typename... T>
2989
+ FMT_INLINE void print(std::FILE* f, format_string<T...> fmt, T&&... args) {
2990
+ const auto& vargs = fmt::make_format_args(args...);
2991
+ return detail::is_utf8() ? vprint(f, fmt, vargs)
2992
+ : detail::vprint_mojibake(f, fmt, vargs);
2993
+ }
2994
+
2995
+ FMT_MODULE_EXPORT_END
2996
+ FMT_GCC_PRAGMA("GCC pop_options")
2997
+ FMT_END_NAMESPACE
2998
+
2999
+ #ifdef FMT_HEADER_ONLY
3000
+ # include "format.h"
3001
+ #endif
3002
+ #endif // FMT_CORE_H_