{"sha":"12fc5a5b124da487e5477825d1955e4bc9d83ecf","node_id":"C_kwDOAiB0YNoAKDEyZmM1YTViMTI0ZGE0ODdlNTQ3NzgyNWQxOTU1ZTRiYzlkODNlY2Y","commit":{"author":{"name":"thinlang","email":"37256192+thinlang@users.noreply.github.com","date":"2023-10-25T04:38:18Z"},"committer":{"name":"GitHub","email":"noreply@github.com","date":"2023-10-25T04:38:18Z"},"message":"Removing use of boost::variant and optional from stlab now that it has moved to C++17 (#531)\n\n* Removing use of boost::variant and optional from stlab now that it has moved to C++17\r\n\r\n* fixing one Windows error\r\n\r\n* adding using type for clarity\r\n\r\n* Update docs/tips/stop-using-out-arguments.md\r\n\r\n---------\r\n\r\nCo-authored-by: Bryn Aspestrand <aspestra@adobe.com>","tree":{"sha":"5b49990f7d2d9da92254c21628b6dee964034fcd","url":"https://api.github.com/repos/stlab/stlab/git/trees/5b49990f7d2d9da92254c21628b6dee964034fcd"},"url":"https://api.github.com/repos/stlab/stlab/git/commits/12fc5a5b124da487e5477825d1955e4bc9d83ecf","comment_count":0,"verification":{"verified":true,"reason":"valid","signature":"-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJlOJu6CRBK7hj4Ov3rIwAA72kIAH0KmmncGng+CyP+iMGpsZi/\nmGYfXk+kq3S7cetH0ZM0V6kdihtG+w96Q8KdAsZChAK/2tZvOiDWPvcXDofj+JTX\nCh6DD6w/oX3O52zHghxTV1H3SAE0JK67Acaqfn10qZlopv65VmCLVKreIBmN57f8\nGZ39wh28bw4fGatpA/ieh8+9+INMAwlNJq1Ja3NTmw/fK5aYUP7Yj+/6dsHiXLAt\numV+V7tmTHaLa3UjvjUK23SUz0NJrNXH+/TUiuTQHI3POUIC858AYsH+76ItQNwV\nrVcsnHvgFttoEzxyLQY70Ay0hsQByP5VALjq9YgoTGyexH53jF8FqtZkxdVvQ6I=\n=TuRF\n-----END PGP SIGNATURE-----\n","payload":"tree 5b49990f7d2d9da92254c21628b6dee964034fcd\nparent 4044ffa258244a94cfb89d17f82355569647a697\nauthor thinlang <37256192+thinlang@users.noreply.github.com> 1698208698 -0700\ncommitter GitHub <noreply@github.com> 1698208698 -0700\n\nRemoving use of boost::variant and optional from stlab now that it has moved to C++17 (#531)\n\n* Removing use of boost::variant and optional from stlab now that it has moved to C++17\r\n\r\n* fixing one Windows error\r\n\r\n* adding using type for clarity\r\n\r\n* Update docs/tips/stop-using-out-arguments.md\r\n\r\n---------\r\n\r\nCo-authored-by: Bryn Aspestrand <aspestra@adobe.com>","verified_at":"2024-01-16T19:59:59Z"}},"url":"https://api.github.com/repos/stlab/stlab/commits/12fc5a5b124da487e5477825d1955e4bc9d83ecf","html_url":"https://github.com/stlab/stlab/commit/12fc5a5b124da487e5477825d1955e4bc9d83ecf","comments_url":"https://api.github.com/repos/stlab/stlab/commits/12fc5a5b124da487e5477825d1955e4bc9d83ecf/comments","author":{"login":"thinlang","id":37256192,"node_id":"MDQ6VXNlcjM3MjU2MTky","avatar_url":"https://avatars.githubusercontent.com/u/37256192?v=4","gravatar_id":"","url":"https://api.github.com/users/thinlang","html_url":"https://github.com/thinlang","followers_url":"https://api.github.com/users/thinlang/followers","following_url":"https://api.github.com/users/thinlang/following{/other_user}","gists_url":"https://api.github.com/users/thinlang/gists{/gist_id}","starred_url":"https://api.github.com/users/thinlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thinlang/subscriptions","organizations_url":"https://api.github.com/users/thinlang/orgs","repos_url":"https://api.github.com/users/thinlang/repos","events_url":"https://api.github.com/users/thinlang/events{/privacy}","received_events_url":"https://api.github.com/users/thinlang/received_events","type":"User","user_view_type":"public","site_admin":false},"committer":{"login":"web-flow","id":19864447,"node_id":"MDQ6VXNlcjE5ODY0NDQ3","avatar_url":"https://avatars.githubusercontent.com/u/19864447?v=4","gravatar_id":"","url":"https://api.github.com/users/web-flow","html_url":"https://github.com/web-flow","followers_url":"https://api.github.com/users/web-flow/followers","following_url":"https://api.github.com/users/web-flow/following{/other_user}","gists_url":"https://api.github.com/users/web-flow/gists{/gist_id}","starred_url":"https://api.github.com/users/web-flow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/web-flow/subscriptions","organizations_url":"https://api.github.com/users/web-flow/orgs","repos_url":"https://api.github.com/users/web-flow/repos","events_url":"https://api.github.com/users/web-flow/events{/privacy}","received_events_url":"https://api.github.com/users/web-flow/received_events","type":"User","user_view_type":"public","site_admin":false},"parents":[{"sha":"4044ffa258244a94cfb89d17f82355569647a697","url":"https://api.github.com/repos/stlab/stlab/commits/4044ffa258244a94cfb89d17f82355569647a697","html_url":"https://github.com/stlab/stlab/commit/4044ffa258244a94cfb89d17f82355569647a697"}],"stats":{"total":477,"additions":90,"deletions":387},"files":[{"sha":"66242e950c99800721b9498f784ffa5f608d9d53","filename":"CMakeLists.txt","status":"modified","additions":0,"deletions":11,"changes":11,"blob_url":"https://github.com/stlab/stlab/blob/12fc5a5b124da487e5477825d1955e4bc9d83ecf/CMakeLists.txt","raw_url":"https://github.com/stlab/stlab/raw/12fc5a5b124da487e5477825d1955e4bc9d83ecf/CMakeLists.txt","contents_url":"https://api.github.com/repos/stlab/stlab/contents/CMakeLists.txt?ref=12fc5a5b124da487e5477825d1955e4bc9d83ecf","patch":"@@ -18,8 +18,6 @@ cmake_dependent_option( stlab.coverage\n   \"Enable binary instrumentation to collect test coverage information in the DEBUG configuration\"\n   OFF PROJECT_IS_TOP_LEVEL OFF )\n \n-stlab_check_disfunctional_variant_optional(STLAB_DEFAULT_USE_BOOST_CPP17_SHIMS)\n-option( STLAB_USE_BOOST_CPP17_SHIMS \"Use variant and optional from Boost instead of std. Useful for non-conforming compilers.\" ${STLAB_DEFAULT_USE_BOOST_CPP17_SHIMS} )\n stlab_check_disfunctional_coroutines(STLAB_DEFAULT_NO_STD_COROUTINES)\n option( STLAB_NO_STD_COROUTINES \"Suppress usage of standard coroutines. Useful for non-conforming compilers.\" ${STLAB_DEFAULT_NO_STD_COROUTINES} )\n stlab_detect_thread_system(STLAB_DEFAULT_THREAD_SYSTEM)\n@@ -35,10 +33,6 @@ if( BUILD_TESTING AND NOT Boost_unit_test_framework_FOUND )\n   message( SEND_ERROR \"BUILD_TESTING is enabled, but an installation of Boost.Test was not found.\" )\n endif()\n \n-if( STLAB_USE_BOOST_CPP17_SHIMS AND NOT Boost_FOUND )\n-  message( SEND_ERROR \"STLAB_USE_BOOST_CPP17_SHIMS is enabled, but a Boost installation was not found.\" )\n-endif()\n-\n if( (NOT STLAB_THREAD_SYSTEM STREQUAL \"none\") AND NOT Threads_FOUND )\n   message( SEND_ERROR \"STLAB_THREAD_SYSTEM is not \\\"none\\\", but a thread system was not found.\" )\n endif()\n@@ -89,10 +83,6 @@ target_compile_definitions( stlab INTERFACE $<$<CXX_COMPILER_ID:MSVC>:NOMINMAX>\n \n add_subdirectory( stlab )\n \n-if ( STLAB_USE_BOOST_CPP17_SHIMS )\n-  target_link_libraries( stlab INTERFACE Boost::boost )\n-endif()\n-\n if ( NOT STLAB_THREAD_SYSTEM STREQUAL \"none\"  )\n   target_link_libraries( stlab INTERFACE Threads::Threads )\n endif()\n@@ -109,7 +99,6 @@ elseif (STLAB_MAIN_EXECUTOR STREQUAL \"qt6\")\n   target_link_libraries( stlab INTERFACE Qt6::Core )\n endif()\n \n-message(STATUS \"stlab: Use Boost C++17 Shims: ${STLAB_USE_BOOST_CPP17_SHIMS}\")\n message(STATUS \"stlab: Disable Coroutines: ${STLAB_DEFAULT_NO_STD_COROUTINES}\")\n message(STATUS \"stlab: Thread System: ${STLAB_THREAD_SYSTEM}\")\n message(STATUS \"stlab: Task System: ${STLAB_TASK_SYSTEM}\")"},{"sha":"35fdb665e1ca1600ca34cdb26d6900da464d1df5","filename":"cmake/StlabUtil.cmake","status":"modified","additions":0,"deletions":24,"changes":24,"blob_url":"https://github.com/stlab/stlab/blob/12fc5a5b124da487e5477825d1955e4bc9d83ecf/cmake%2FStlabUtil.cmake","raw_url":"https://github.com/stlab/stlab/raw/12fc5a5b124da487e5477825d1955e4bc9d83ecf/cmake%2FStlabUtil.cmake","contents_url":"https://api.github.com/repos/stlab/stlab/contents/cmake%2FStlabUtil.cmake?ref=12fc5a5b124da487e5477825d1955e4bc9d83ecf","patch":"@@ -4,30 +4,6 @@\n include( CheckCXXSymbolExists )\n include( CheckCXXSourceRuns )\n \n-# Determine if the selected C++ compiler has functional versions of\n-# 'std::variant' and 'std::optional'. Set the specified 'result_var' to 'TRUE'\n-# if they are determined to be disfunctional and 'FALSE' otherwise. Note that\n-# this check consists of a smoke test and does not check all the ways these\n-# library components may be deficient.\n-function( stlab_check_disfunctional_variant_optional result_var )\n-  check_cxx_source_runs( \"\n-    #include <variant>\n-    #include <optional>\n-\n-    int main() {\n-        std::optional<int> op = 3;\n-        op = std::nullopt;\n-\n-        std::variant<int, char> v = 12;\n-        return 0;\n-    }\" STLAB_HAVE_FUNCTIONAL_VARIANT_OPTIONAL )\n-  if( STLAB_HAVE_FUNCTIONAL_VARIANT_OPTIONAL )\n-    set( ${result_var} FALSE PARENT_SCOPE )\n-  else()\n-    set( ${result_var} TRUE PARENT_SCOPE )\n-  endif()\n-endfunction()\n-\n # Determine if the selected C++ compiler has functional coroutines. Set the\n # specified 'result_var' to 'TRUE' if they are determined to be disfunctional\n # and 'FALSE' otherwise. Note that this check consists of a smoke test and does"},{"sha":"d66157c9bc55f68e5524141fc7823d7fe794cea2","filename":"cmake/stlabConfig.cmake.in","status":"modified","additions":0,"deletions":4,"changes":4,"blob_url":"https://github.com/stlab/stlab/blob/12fc5a5b124da487e5477825d1955e4bc9d83ecf/cmake%2FstlabConfig.cmake.in","raw_url":"https://github.com/stlab/stlab/raw/12fc5a5b124da487e5477825d1955e4bc9d83ecf/cmake%2FstlabConfig.cmake.in","contents_url":"https://api.github.com/repos/stlab/stlab/contents/cmake%2FstlabConfig.cmake.in?ref=12fc5a5b124da487e5477825d1955e4bc9d83ecf","patch":"@@ -1,9 +1,5 @@\n include( CMakeFindDependencyMacro )\n \n-if ( @STLAB_USE_BOOST_CPP17_SHIMS@ )\n-  find_dependency( Boost 1.74.0 )\n-endif()\n-\n if ( @STLAB_TASK_SYSTEM@ STREQUAL \"libdispatch\" )\n   find_dependency( libdispatch )\n endif()"},{"sha":"85da08f831cbdc57487214959f1e5828373d9eff","filename":"docs/README.md","status":"modified","additions":0,"deletions":1,"changes":1,"blob_url":"https://github.com/stlab/stlab/blob/12fc5a5b124da487e5477825d1955e4bc9d83ecf/docs%2FREADME.md","raw_url":"https://github.com/stlab/stlab/raw/12fc5a5b124da487e5477825d1955e4bc9d83ecf/docs%2FREADME.md","contents_url":"https://api.github.com/repos/stlab/stlab/contents/docs%2FREADME.md?ref=12fc5a5b124da487e5477825d1955e4bc9d83ecf","patch":"@@ -68,7 +68,6 @@ Specify the following options:\n  STLAB_NO_STD_COROUTINES          ON\n  STLAB_TASK_SYSTEM                portable\n  STLAB_THREAD_SYSTEM              pthread\n- STLAB_USE_BOOST_CPP17_SHIMS      OFF\n  stlab.coverage                   OFF\n ```\n "},{"sha":"7ee024e105de4b555104b4d696b283be6658c637","filename":"docs/libraries/concurrency/future.hpp/future3CT2C20enable_if_.6354105c/m_error.md","status":"modified","additions":2,"deletions":2,"changes":4,"blob_url":"https://github.com/stlab/stlab/blob/12fc5a5b124da487e5477825d1955e4bc9d83ecf/docs%2Flibraries%2Fconcurrency%2Ffuture.hpp%2Ffuture3CT2C20enable_if_.6354105c%2Fm_error.md","raw_url":"https://github.com/stlab/stlab/raw/12fc5a5b124da487e5477825d1955e4bc9d83ecf/docs%2Flibraries%2Fconcurrency%2Ffuture.hpp%2Ffuture3CT2C20enable_if_.6354105c%2Fm_error.md","contents_url":"https://api.github.com/repos/stlab/stlab/contents/docs%2Flibraries%2Fconcurrency%2Ffuture.hpp%2Ffuture3CT2C20enable_if_.6354105c%2Fm_error.md?ref=12fc5a5b124da487e5477825d1955e4bc9d83ecf","patch":"@@ -7,10 +7,10 @@ tags:\n   - method\n defined_in_file: concurrency/future.hpp\n overloads:\n-  stlab::optional<std::exception_ptr> error() const &:\n+  std::optional<std::exception_ptr> error() const &:\n     annotation:\n       - deprecated (Use exception() instead)\n     description: __OPTIONAL__\n     return: __OPTIONAL__\n-    signature_with_names: stlab::optional<std::exception_ptr> error() const &\n+    signature_with_names: std::optional<std::exception_ptr> error() const &\n ---"},{"sha":"ed3d12513379c6c07e11a23fa96db95955d8b1be","filename":"docs/libraries/concurrency/future.hpp/future3CT2C20enable_if_.e055d50a/m_error.md","status":"modified","additions":2,"deletions":2,"changes":4,"blob_url":"https://github.com/stlab/stlab/blob/12fc5a5b124da487e5477825d1955e4bc9d83ecf/docs%2Flibraries%2Fconcurrency%2Ffuture.hpp%2Ffuture3CT2C20enable_if_.e055d50a%2Fm_error.md","raw_url":"https://github.com/stlab/stlab/raw/12fc5a5b124da487e5477825d1955e4bc9d83ecf/docs%2Flibraries%2Fconcurrency%2Ffuture.hpp%2Ffuture3CT2C20enable_if_.e055d50a%2Fm_error.md","contents_url":"https://api.github.com/repos/stlab/stlab/contents/docs%2Flibraries%2Fconcurrency%2Ffuture.hpp%2Ffuture3CT2C20enable_if_.e055d50a%2Fm_error.md?ref=12fc5a5b124da487e5477825d1955e4bc9d83ecf","patch":"@@ -7,12 +7,12 @@ tags:\n   - method\n defined_in_file: concurrency/future.hpp\n overloads:\n-  stlab::optional<std::exception_ptr> error() const &:\n+  std::optional<std::exception_ptr> error() const &:\n     annotation:\n       - deprecated (Use exception() instead)\n     description: Iff an error occurred, returns the stored exception pointer.\n     return: __OPTIONAL__\n-    signature_with_names: stlab::optional<std::exception_ptr> error() const &\n+    signature_with_names: std::optional<std::exception_ptr> error() const &\n ---\n Returns a potentially stored exception pointer. This function will be removed in future versions of the library. Use `exception()` instead.\n "},{"sha":"7ee024e105de4b555104b4d696b283be6658c637","filename":"docs/libraries/concurrency/future.hpp/future3Cvoid2C20void3E/m_error.md","status":"modified","additions":2,"deletions":2,"changes":4,"blob_url":"https://github.com/stlab/stlab/blob/12fc5a5b124da487e5477825d1955e4bc9d83ecf/docs%2Flibraries%2Fconcurrency%2Ffuture.hpp%2Ffuture3Cvoid2C20void3E%2Fm_error.md","raw_url":"https://github.com/stlab/stlab/raw/12fc5a5b124da487e5477825d1955e4bc9d83ecf/docs%2Flibraries%2Fconcurrency%2Ffuture.hpp%2Ffuture3Cvoid2C20void3E%2Fm_error.md","contents_url":"https://api.github.com/repos/stlab/stlab/contents/docs%2Flibraries%2Fconcurrency%2Ffuture.hpp%2Ffuture3Cvoid2C20void3E%2Fm_error.md?ref=12fc5a5b124da487e5477825d1955e4bc9d83ecf","patch":"@@ -7,10 +7,10 @@ tags:\n   - method\n defined_in_file: concurrency/future.hpp\n overloads:\n-  stlab::optional<std::exception_ptr> error() const &:\n+  std::optional<std::exception_ptr> error() const &:\n     annotation:\n       - deprecated (Use exception() instead)\n     description: __OPTIONAL__\n     return: __OPTIONAL__\n-    signature_with_names: stlab::optional<std::exception_ptr> error() const &\n+    signature_with_names: std::optional<std::exception_ptr> error() const &\n ---"},{"sha":"1acacbf0802480eb74618d273a48c9a14649ff11","filename":"docs/libraries/concurrency/future/future/error.md","status":"modified","additions":2,"deletions":2,"changes":4,"blob_url":"https://github.com/stlab/stlab/blob/12fc5a5b124da487e5477825d1955e4bc9d83ecf/docs%2Flibraries%2Fconcurrency%2Ffuture%2Ffuture%2Ferror.md","raw_url":"https://github.com/stlab/stlab/raw/12fc5a5b124da487e5477825d1955e4bc9d83ecf/docs%2Flibraries%2Fconcurrency%2Ffuture%2Ffuture%2Ferror.md","contents_url":"https://api.github.com/repos/stlab/stlab/contents/docs%2Flibraries%2Fconcurrency%2Ffuture%2Ffuture%2Ferror.md?ref=12fc5a5b124da487e5477825d1955e4bc9d83ecf","patch":"@@ -6,10 +6,10 @@ defined-in-header: stlab/concurrency/future.hpp\n tags:\n   - function\n overloads:\n-  stlab::optional<std::exception_ptr> error():\n+  std::optional<std::exception_ptr> error():\n     description: In case an error occurred, it returns the stored exception pointer.\n     return: __OPTIONAL__\n-    signature_with_names: \"[[deprecated]] stlab::optional<std::exception_ptr> error() const\"\n+    signature_with_names: \"[[deprecated]] std::optional<std::exception_ptr> error() const\"\n ---\n Returns a potentially stored exception pointer. This function will be removed in future versions of the library. Use `exception()` instead.\n "},{"sha":"affe34fdc8e48bf27b16464f2311e12d7c948916","filename":"docs/libraries/concurrency/future/future/get_try.md","status":"modified","additions":2,"deletions":2,"changes":4,"blob_url":"https://github.com/stlab/stlab/blob/12fc5a5b124da487e5477825d1955e4bc9d83ecf/docs%2Flibraries%2Fconcurrency%2Ffuture%2Ffuture%2Fget_try.md","raw_url":"https://github.com/stlab/stlab/raw/12fc5a5b124da487e5477825d1955e4bc9d83ecf/docs%2Flibraries%2Fconcurrency%2Ffuture%2Ffuture%2Fget_try.md","contents_url":"https://api.github.com/repos/stlab/stlab/contents/docs%2Flibraries%2Fconcurrency%2Ffuture%2Ffuture%2Fget_try.md?ref=12fc5a5b124da487e5477825d1955e4bc9d83ecf","patch":"@@ -6,10 +6,10 @@ defined-in-header: stlab/concurrency/future.hpp\n tags:\n   - function\n overloads:\n-  stlab::optional<T> get_try():\n+  std::optional<T> get_try():\n     description: If `T` is not `void`, it returns an initialized `optional` if the future has succeeded, otherwise an empty `optional<T>`. In case that an error occurred it rethrows the captured exception.\n     return: __OPTIONAL__\n-    signature_with_names: stlab::optional<T> get_try()\n+    signature_with_names: std::optional<T> get_try()\n   bool get_try():\n     description: If `T` is void it returns `true` if the future succeeded, otherwise `false`. In case that an error occurred it rethrows the captured exception.\n     return: __OPTIONAL__"},{"sha":"ef5ca8acabd8549eeb35d58c80b6f5dd3f3882ee","filename":"docs/libraries/concurrency/optional.hpp/index.md","status":"removed","additions":0,"deletions":13,"changes":13,"blob_url":"https://github.com/stlab/stlab/blob/4044ffa258244a94cfb89d17f82355569647a697/docs%2Flibraries%2Fconcurrency%2Foptional.hpp%2Findex.md","raw_url":"https://github.com/stlab/stlab/raw/4044ffa258244a94cfb89d17f82355569647a697/docs%2Flibraries%2Fconcurrency%2Foptional.hpp%2Findex.md","contents_url":"https://api.github.com/repos/stlab/stlab/contents/docs%2Flibraries%2Fconcurrency%2Foptional.hpp%2Findex.md?ref=4044ffa258244a94cfb89d17f82355569647a697","patch":"@@ -1,13 +0,0 @@\n----\n-layout: library\n-title: concurrency/optional.hpp\n-owner: __MISSING__\n-brief: __MISSING__\n-tags:\n-  - sourcefile\n-library-type: sourcefile\n-typedefs:\n-  optional:\n-    definition: std::optional<T>\n-    description: __MISSING__\n----"},{"sha":"dd1bd621d7ecd150721f8a1835f2305cdb65702f","filename":"docs/libraries/concurrency/tuple_algorithm.hpp/index.md","status":"modified","additions":1,"deletions":1,"changes":2,"blob_url":"https://github.com/stlab/stlab/blob/12fc5a5b124da487e5477825d1955e4bc9d83ecf/docs%2Flibraries%2Fconcurrency%2Ftuple_algorithm.hpp%2Findex.md","raw_url":"https://github.com/stlab/stlab/raw/12fc5a5b124da487e5477825d1955e4bc9d83ecf/docs%2Flibraries%2Fconcurrency%2Ftuple_algorithm.hpp%2Findex.md","contents_url":"https://api.github.com/repos/stlab/stlab/contents/docs%2Flibraries%2Fconcurrency%2Ftuple_algorithm.hpp%2Findex.md?ref=12fc5a5b124da487e5477825d1955e4bc9d83ecf","patch":"@@ -8,7 +8,7 @@ tags:\n library-type: sourcefile\n typedefs:\n   optional_placeholder_tuple:\n-    definition: std::tuple<stlab::optional<typename std::conditional<std::is_same<void, Ts>::value, detail::placeholder, Ts>::type>...>\n+    definition: std::tuple<std::optional<typename std::conditional<std::is_same<void, Ts>::value, detail::placeholder, Ts>::type>...>\n     description: __MISSING__\n   placeholder_tuple:\n     definition: std::tuple<typename std::conditional<std::is_same<void, Ts>::value, detail::placeholder, Ts>::type...>"},{"sha":"095614fe99a75b59b4a1fa63fdf95c4675279e41","filename":"docs/libraries/concurrency/variant.hpp/f_get.md","status":"removed","additions":0,"deletions":44,"changes":44,"blob_url":"https://github.com/stlab/stlab/blob/4044ffa258244a94cfb89d17f82355569647a697/docs%2Flibraries%2Fconcurrency%2Fvariant.hpp%2Ff_get.md","raw_url":"https://github.com/stlab/stlab/raw/4044ffa258244a94cfb89d17f82355569647a697/docs%2Flibraries%2Fconcurrency%2Fvariant.hpp%2Ff_get.md","contents_url":"https://api.github.com/repos/stlab/stlab/contents/docs%2Flibraries%2Fconcurrency%2Fvariant.hpp%2Ff_get.md?ref=4044ffa258244a94cfb89d17f82355569647a697","patch":"@@ -1,44 +0,0 @@\n----\n-layout: function\n-title: get\n-owner: __MISSING__\n-brief: __MISSING__\n-tags:\n-  - function\n-defined_in_file: concurrency/variant.hpp\n-overloads:\n-  \"template <class T, class... Types>\\nconstexpr T & get(std::variant<Types...> &)\":\n-    arguments:\n-      - description: __OPTIONAL__\n-        name: v\n-        type: std::variant<Types...> &\n-    description: __MISSING__\n-    return: __OPTIONAL__\n-    signature_with_names: \"template <class T, class... Types>\\nconstexpr T & get(std::variant<Types...> & v)\"\n-  \"template <class T, class... Types>\\nconstexpr T && get(std::variant<Types...> &&)\":\n-    arguments:\n-      - description: __OPTIONAL__\n-        name: v\n-        type: std::variant<Types...> &&\n-    description: __MISSING__\n-    return: __OPTIONAL__\n-    signature_with_names: \"template <class T, class... Types>\\nconstexpr T && get(std::variant<Types...> && v)\"\n-  \"template <class T, class... Types>\\nconstexpr const T & get(const std::variant<Types...> &)\":\n-    arguments:\n-      - description: __OPTIONAL__\n-        name: v\n-        type: const std::variant<Types...> &\n-    description: __MISSING__\n-    return: __OPTIONAL__\n-    signature_with_names: \"template <class T, class... Types>\\nconstexpr const T & get(const std::variant<Types...> & v)\"\n-  \"template <class T, class... Types>\\nconstexpr const T && get(const std::variant<Types...> &&)\":\n-    arguments:\n-      - description: __OPTIONAL__\n-        name: v\n-        type: const std::variant<Types...> &&\n-    description: __MISSING__\n-    return: __OPTIONAL__\n-    signature_with_names: \"template <class T, class... Types>\\nconstexpr const T && get(const std::variant<Types...> && v)\"\n-namespace:\n-  - stlab\n----"},{"sha":"b649d68c5d2a68513b205fdeda8b2e623445a400","filename":"docs/libraries/concurrency/variant.hpp/f_index.md","status":"removed","additions":0,"deletions":20,"changes":20,"blob_url":"https://github.com/stlab/stlab/blob/4044ffa258244a94cfb89d17f82355569647a697/docs%2Flibraries%2Fconcurrency%2Fvariant.hpp%2Ff_index.md","raw_url":"https://github.com/stlab/stlab/raw/4044ffa258244a94cfb89d17f82355569647a697/docs%2Flibraries%2Fconcurrency%2Fvariant.hpp%2Ff_index.md","contents_url":"https://api.github.com/repos/stlab/stlab/contents/docs%2Flibraries%2Fconcurrency%2Fvariant.hpp%2Ff_index.md?ref=4044ffa258244a94cfb89d17f82355569647a697","patch":"@@ -1,20 +0,0 @@\n----\n-layout: function\n-title: index\n-owner: __MISSING__\n-brief: __MISSING__\n-tags:\n-  - function\n-defined_in_file: concurrency/variant.hpp\n-overloads:\n-  \"template <typename... Types>\\nconstexpr auto index(const std::variant<Types...> &)\":\n-    arguments:\n-      - description: __OPTIONAL__\n-        name: v\n-        type: const std::variant<Types...> &\n-    description: __OPTIONAL__\n-    return: __OPTIONAL__\n-    signature_with_names: \"template <typename... Types>\\nconstexpr auto index(const std::variant<Types...> & v)\"\n-namespace:\n-  - stlab\n----"},{"sha":"d47feb1fed3f5e02c479141079ab33d65b89d45b","filename":"docs/libraries/concurrency/variant.hpp/index.md","status":"removed","additions":0,"deletions":13,"changes":13,"blob_url":"https://github.com/stlab/stlab/blob/4044ffa258244a94cfb89d17f82355569647a697/docs%2Flibraries%2Fconcurrency%2Fvariant.hpp%2Findex.md","raw_url":"https://github.com/stlab/stlab/raw/4044ffa258244a94cfb89d17f82355569647a697/docs%2Flibraries%2Fconcurrency%2Fvariant.hpp%2Findex.md","contents_url":"https://api.github.com/repos/stlab/stlab/contents/docs%2Flibraries%2Fconcurrency%2Fvariant.hpp%2Findex.md?ref=4044ffa258244a94cfb89d17f82355569647a697","patch":"@@ -1,13 +0,0 @@\n----\n-layout: library\n-title: concurrency/variant.hpp\n-owner: __MISSING__\n-brief: __MISSING__\n-tags:\n-  - sourcefile\n-library-type: sourcefile\n-typedefs:\n-  variant:\n-    definition: std::variant<T...>\n-    description: __MISSING__\n----"},{"sha":"1d1759b12e94b831fef21d8260a562c8107ab9b8","filename":"stlab/CMakeLists.txt","status":"modified","additions":0,"deletions":2,"changes":2,"blob_url":"https://github.com/stlab/stlab/blob/12fc5a5b124da487e5477825d1955e4bc9d83ecf/stlab%2FCMakeLists.txt","raw_url":"https://github.com/stlab/stlab/raw/12fc5a5b124da487e5477825d1955e4bc9d83ecf/stlab%2FCMakeLists.txt","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2FCMakeLists.txt?ref=12fc5a5b124da487e5477825d1955e4bc9d83ecf","patch":"@@ -13,7 +13,6 @@ target_sources( stlab INTERFACE\n     concurrency/future.hpp\n     concurrency/immediate_executor.hpp\n     concurrency/main_executor.hpp\n-    concurrency/optional.hpp\n     concurrency/progress.hpp\n     concurrency/ready_future.hpp\n     concurrency/serial_queue.hpp\n@@ -23,7 +22,6 @@ target_sources( stlab INTERFACE\n     concurrency/traits.hpp\n     concurrency/tuple_algorithm.hpp\n     concurrency/utility.hpp\n-    concurrency/variant.hpp\n \n     iterator/set_next.hpp\n "},{"sha":"ceeb9b4be6d954cf30b4edd9b11e38f71aafb1d9","filename":"stlab/concurrency/await.hpp","status":"modified","additions":2,"deletions":1,"changes":3,"blob_url":"https://github.com/stlab/stlab/blob/12fc5a5b124da487e5477825d1955e4bc9d83ecf/stlab%2Fconcurrency%2Fawait.hpp","raw_url":"https://github.com/stlab/stlab/raw/12fc5a5b124da487e5477825d1955e4bc9d83ecf/stlab%2Fconcurrency%2Fawait.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fconcurrency%2Fawait.hpp?ref=12fc5a5b124da487e5477825d1955e4bc9d83ecf","patch":"@@ -15,6 +15,7 @@\n #include <condition_variable>\n #include <exception>\n #include <mutex>\n+#include <optional>\n #include <type_traits>\n #include <utility>\n \n@@ -74,7 +75,7 @@ template <class T>\n struct _get_optional;\n \n template <class T>\n-struct _get_optional<stlab::optional<T>> {\n+struct _get_optional<std::optional<T>> {\n     template <class F>\n     auto operator()(F&& f) {\n         return *std::forward<F>(f);"},{"sha":"4d71fc715697b37bbb4971dfc22eec19e0a4acc6","filename":"stlab/concurrency/channel.hpp","status":"modified","additions":47,"deletions":58,"changes":105,"blob_url":"https://github.com/stlab/stlab/blob/12fc5a5b124da487e5477825d1955e4bc9d83ecf/stlab%2Fconcurrency%2Fchannel.hpp","raw_url":"https://github.com/stlab/stlab/raw/12fc5a5b124da487e5477825d1955e4bc9d83ecf/stlab%2Fconcurrency%2Fchannel.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fconcurrency%2Fchannel.hpp?ref=12fc5a5b124da487e5477825d1955e4bc9d83ecf","patch":"@@ -18,14 +18,14 @@\n #include <memory>\n #include <mutex>\n #include <numeric>\n+#include <optional>\n #include <tuple>\n #include <utility>\n+#include <variant>\n \n #include <stlab/concurrency/executor_base.hpp>\n-#include <stlab/concurrency/optional.hpp>\n #include <stlab/concurrency/traits.hpp>\n #include <stlab/concurrency/tuple_algorithm.hpp>\n-#include <stlab/concurrency/variant.hpp>\n #include <stlab/functional.hpp>\n #include <stlab/memory.hpp>\n \n@@ -191,19 +191,19 @@ using avoid = std::conditional_t<std::is_same<void, T>::value, avoid_, T>;\n /**************************************************************************************************/\n \n template <typename F, std::size_t... I, typename... T>\n-auto invoke_(F&& f, std::tuple<variant<T, std::exception_ptr>...>& t, std::index_sequence<I...>) {\n+auto invoke_(F&& f, std::tuple<std::variant<T, std::exception_ptr>...>& t, std::index_sequence<I...>) {\n     return std::forward<F>(f)(std::move(std::get<I>(t))...);\n }\n \n template <typename F, typename... Args>\n-auto avoid_invoke(F&& f, std::tuple<variant<Args, std::exception_ptr>...>& t)\n+auto avoid_invoke(F&& f, std::tuple<std::variant<Args, std::exception_ptr>...>& t)\n     -> std::enable_if_t<!std::is_same<void, yield_type<unwrap_reference_t<F>, Args...>>::value,\n                         yield_type<unwrap_reference_t<F>, Args...>> {\n     return invoke_(std::forward<F>(f), t, std::make_index_sequence<sizeof...(Args)>());\n }\n \n template <typename F, typename... Args>\n-auto avoid_invoke(F&& f, std::tuple<variant<Args, std::exception_ptr>...>& t)\n+auto avoid_invoke(F&& f, std::tuple<std::variant<Args, std::exception_ptr>...>& t)\n     -> std::enable_if_t<std::is_same<void, yield_type<unwrap_reference_t<F>, Args...>>::value,\n                         avoid_> {\n     invoke_(std::forward<F>(f), t, std::make_index_sequence<sizeof...(Args)>());\n@@ -216,7 +216,7 @@ template <std::size_t S>\n struct invoke_variant_dispatcher {\n     template <typename F, typename T, typename... Args, std::size_t... I>\n     static auto invoke_(F&& f, T& t, std::index_sequence<I...>) {\n-        return std::forward<F>(f)(std::move(stlab::get<Args>(std::get<I>(t)))...);\n+        return std::forward<F>(f)(std::move(std::get<Args>(std::get<I>(t)))...);\n     }\n \n     template <typename F, typename T, typename... Args>\n@@ -228,25 +228,16 @@ struct invoke_variant_dispatcher {\n \n template <>\n struct invoke_variant_dispatcher<1> {\n-    template <typename F, typename T, typename Arg>\n-    static auto invoke_(F&&, T&) -> std::enable_if_t<std::is_same<Arg, void>::value, void> {\n-        return;\n-    }\n-    template <typename F, typename T, typename Arg>\n-    static auto invoke_(F&& f, T&) -> std::enable_if_t<std::is_same<Arg, detail::avoid_>::value,\n-                                                       decltype(std::forward<F>(f)())> {\n-        return std::forward<F>(f)();\n-    }\n-    template <typename F, typename T, typename Arg>\n-    static auto invoke_(F&& f, T& t) -> std::enable_if_t<\n-        !(std::is_same<Arg, detail::avoid_>::value || std::is_same<Arg, detail::avoid_>::value),\n-        decltype(std::forward<F>(f)(std::move(stlab::get<Arg>(std::get<0>(t)))))> {\n-        return std::forward<F>(f)(std::move(stlab::get<Arg>(std::get<0>(t))));\n-    }\n-\n     template <typename F, typename T, typename... Args>\n-    static auto invoke(F&& f, T& t) {\n-        return invoke_<F, T, first_t<Args...>>(std::forward<F>(f), t);\n+    static auto invoke(F&& f, [[maybe_unused]] T& t) {\n+        using arg1_t = first_t<Args...>;\n+        if constexpr (std::is_same_v<arg1_t, void>) {\n+            return;\n+        } else if constexpr (std::is_same_v<arg1_t, detail::avoid_>) {\n+            return std::forward<F>(f)();\n+        } else {\n+            return std::forward<F>(f)(std::move(std::get<arg1_t>(std::get<0>(t))));\n+        }\n     }\n };\n \n@@ -303,13 +294,13 @@ template <typename T>\n constexpr bool has_process_close_v = is_detected_v<process_close_t, T>;\n \n template <typename T>\n-auto process_close(stlab::optional<T>& x)\n+auto process_close(std::optional<T>& x)\n     -> std::enable_if_t<has_process_close_v<unwrap_reference_t<T>>> {\n     if (x) unwrap(*x).close();\n }\n \n template <typename T>\n-auto process_close(stlab::optional<T>&)\n+auto process_close(std::optional<T>&)\n     -> std::enable_if_t<!has_process_close_v<unwrap_reference_t<T>>> {}\n \n /**************************************************************************************************/\n@@ -321,13 +312,13 @@ template <typename T>\n constexpr bool has_process_state_v = is_detected_v<process_state_t, T>;\n \n template <typename T>\n-auto get_process_state(const stlab::optional<T>& x)\n+auto get_process_state(const std::optional<T>& x)\n     -> std::enable_if_t<has_process_state_v<unwrap_reference_t<T>>, process_state_scheduled> {\n     return unwrap(*x).state();\n }\n \n template <typename T>\n-auto get_process_state(const stlab::optional<T>&)\n+auto get_process_state(const std::optional<T>&)\n     -> std::enable_if_t<!has_process_state_v<unwrap_reference_t<T>>, process_state_scheduled> {\n     return await_forever;\n }\n@@ -371,30 +362,30 @@ constexpr bool has_process_await_v = is_detected_v<process_await_t, T, Args...>;\n \n template <typename P, typename... T, std::size_t... I>\n void await_variant_args_(P& process,\n-                         std::tuple<variant<detail::avoid<T>, std::exception_ptr>...>& args,\n+                         std::tuple<std::variant<detail::avoid<T>, std::exception_ptr>...>& args,\n                          std::index_sequence<I...>) {\n-    unwrap(process).await(std::move(stlab::get<T>(std::get<I>(args)))...);\n+    unwrap(process).await(std::move(std::get<T>(std::get<I>(args)))...);\n }\n \n template <typename P, typename... T>\n void await_variant_args(P& process,\n-                        std::tuple<variant<detail::avoid<T>, std::exception_ptr>...>& args) {\n+                        std::tuple<std::variant<detail::avoid<T>, std::exception_ptr>...>& args) {\n     await_variant_args_<P, T...>(process, args, std::make_index_sequence<sizeof...(T)>());\n }\n \n /**************************************************************************************************/\n \n template <typename T>\n-stlab::optional<std::exception_ptr> find_argument_error(T& argument) {\n-    stlab::optional<std::exception_ptr> result;\n+std::optional<std::exception_ptr> find_argument_error(T& argument) {\n+    std::optional<std::exception_ptr> result;\n \n     auto error_index = tuple_find(argument, [](const auto& c) {\n-        return static_cast<message_t>(index(c)) == message_t::error;\n+        return static_cast<message_t>(c.index()) == message_t::error;\n     });\n \n     if (error_index != std::tuple_size<T>::value) {\n         result = get_i(\n-            argument, error_index, [](auto& elem) { return stlab::get<std::exception_ptr>(elem); },\n+            argument, error_index, [](auto& elem) { return std::get<std::exception_ptr>(elem); },\n             std::exception_ptr{});\n     }\n \n@@ -406,9 +397,9 @@ stlab::optional<std::exception_ptr> find_argument_error(T& argument) {\n template <typename T>\n struct default_queue_strategy {\n     static const std::size_t arguments_size = 1;\n-    using value_type = std::tuple<variant<avoid<T>, std::exception_ptr>>;\n+    using value_type = std::tuple<std::variant<avoid<T>, std::exception_ptr>>;\n \n-    std::deque<variant<avoid<T>, std::exception_ptr>> _queue;\n+    std::deque<std::variant<avoid<T>, std::exception_ptr>> _queue;\n \n     bool empty() const { return _queue.empty(); }\n \n@@ -435,9 +426,9 @@ template <typename... T>\n struct zip_with_queue_strategy {\n     static const std::size_t Size = sizeof...(T);\n     static const std::size_t arguments_size = Size;\n-    using value_type = std::tuple<variant<T, std::exception_ptr>...>;\n+    using value_type = std::tuple<std::variant<T, std::exception_ptr>...>;\n     using queue_size_t = std::array<std::size_t, Size>;\n-    using queue_t = std::tuple<std::deque<variant<T, std::exception_ptr>>...>;\n+    using queue_t = std::tuple<std::deque<std::variant<T, std::exception_ptr>>...>;\n \n     queue_t _queue;\n \n@@ -483,10 +474,10 @@ template <typename... T>\n struct round_robin_queue_strategy {\n     static const std::size_t Size = sizeof...(T);\n     static const std::size_t arguments_size = 1;\n-    using item_t = variant<first_t<T...>, std::exception_ptr>;\n+    using item_t = std::variant<first_t<T...>, std::exception_ptr>;\n     using value_type = std::tuple<item_t>;\n     using queue_size_t = std::array<std::size_t, Size>;\n-    using queue_t = std::tuple<std::deque<variant<T, std::exception_ptr>>...>;\n+    using queue_t = std::tuple<std::deque<std::variant<T, std::exception_ptr>>...>;\n     std::size_t _index{0};\n     std::size_t _popped_index{0};\n     queue_t _queue;\n@@ -539,10 +530,10 @@ template <typename... T>\n struct unordered_queue_strategy {\n     static const std::size_t Size = sizeof...(T);\n     static const std::size_t arguments_size = 1;\n-    using item_t = variant<first_t<T...>, std::exception_ptr>;\n+    using item_t = std::variant<first_t<T...>, std::exception_ptr>;\n     using value_type = std::tuple<item_t>;\n     using queue_size_t = std::array<std::size_t, Size>;\n-    using queue_t = std::tuple<std::deque<variant<T, std::exception_ptr>>...>;\n+    using queue_t = std::tuple<std::deque<std::variant<T, std::exception_ptr>>...>;\n     std::size_t _index{0};\n     std::size_t _popped_index{0};\n     queue_t _queue;\n@@ -696,14 +687,14 @@ template <typename R>\n struct downstream<\n     R,\n     std::enable_if_t<!std::is_copy_constructible<R>::value && !std::is_same<R, void>::value>> {\n-    stlab::optional<sender<R>> _data;\n+    std::optional<sender<R>> _data;\n \n     template <typename F>\n     void append_receiver(F&& f) {\n         _data = std::forward<F>(f);\n     }\n \n-    void clear() { _data = stlab::nullopt; }\n+    void clear() { _data = std::nullopt; }\n \n     std::size_t size() const { return 1; }\n \n@@ -746,7 +737,7 @@ struct shared_process\n     queue_strategy_t _queue;\n \n     executor_t _executor;\n-    stlab::optional<process_t> _process;\n+    std::optional<process_t> _process;\n \n     std::mutex _process_mutex;\n \n@@ -830,7 +821,7 @@ struct shared_process\n         if (do_final) {\n             std::unique_lock<std::mutex> lock(_downstream_mutex);\n             _downstream.clear(); // This will propagate the close to anything downstream\n-            _process = stlab::nullopt;\n+            _process = std::nullopt;\n         }\n     }\n \n@@ -862,7 +853,7 @@ struct shared_process\n     }\n \n     auto pop_from_queue() {\n-        stlab::optional<typename Q::value_type> message;\n+        std::optional<typename Q::value_type> message;\n         std::array<bool, sizeof...(Args)> do_cts = {{false}};\n         bool do_close = false;\n \n@@ -882,7 +873,7 @@ struct shared_process\n \n     bool dequeue() {\n         using queue_t = typename Q::value_type;\n-        stlab::optional<queue_t> message;\n+        std::optional<queue_t> message;\n         std::array<bool, sizeof...(Args)> do_cts;\n         bool do_close = false;\n \n@@ -1101,7 +1092,7 @@ struct shared_process\n     template <typename U>\n     auto step() noexcept -> std::enable_if_t<!has_process_yield_v<unwrap_reference_t<U>>> {\n         using queue_t = typename Q::value_type;\n-        stlab::optional<queue_t> message;\n+        std::optional<queue_t> message;\n         std::array<bool, sizeof...(Args)> do_cts;\n         bool do_close = false;\n \n@@ -1119,8 +1110,6 @@ struct shared_process\n                 do_close = true;\n             } else {\n                 try {\n-                    // The message cannot be moved because boost::variant supports r-values just\n-                    // since 1.65.\n                     broadcast(\n                         avoid_invoke_variant<process_t, queue_t, R, Q::arguments_size, Args...>(\n                             std::move(*_process), *message));\n@@ -1360,8 +1349,8 @@ struct buffer_size {\n namespace detail {\n \n struct annotations {\n-    stlab::optional<executor_t> _executor;\n-    stlab::optional<std::size_t> _buffer_size;\n+    std::optional<executor_t> _executor;\n+    std::optional<std::size_t> _buffer_size;\n \n     annotations(executor_t e, std::size_t bs) : _executor(std::move(e)), _buffer_size(bs) {}\n     explicit annotations(executor_t e) : _executor(std::move(e)) {}\n@@ -1618,8 +1607,8 @@ class sender<T, enable_if_copyable<T>> {\n         if (p) p->send(std::forward<A>(args)...);\n     }\n \n-    optional<std::size_t> free_buffer() const {\n-        optional<std::size_t> result;\n+    std::optional<std::size_t> free_buffer() const {\n+        std::optional<std::size_t> result;\n         auto p = _p.lock();\n         if (p) result = p->free_buffer();\n         return result;\n@@ -1676,8 +1665,8 @@ class sender<T, enable_if_not_copyable<T>> {\n         if (p) p->send(std::forward<A>(args)...);\n     }\n \n-    optional<std::size_t> free_buffer() const {\n-        optional<std::size_t> result;\n+    std::optional<std::size_t> free_buffer() const {\n+        std::optional<std::size_t> result;\n         auto p = _p.lock();\n         if (p) result = p->free_buffer();\n         return result;"},{"sha":"f94c6741e92da197697bd067a0a7f02185f466f5","filename":"stlab/concurrency/future.hpp","status":"modified","additions":19,"deletions":19,"changes":38,"blob_url":"https://github.com/stlab/stlab/blob/12fc5a5b124da487e5477825d1955e4bc9d83ecf/stlab%2Fconcurrency%2Ffuture.hpp","raw_url":"https://github.com/stlab/stlab/raw/12fc5a5b124da487e5477825d1955e4bc9d83ecf/stlab%2Fconcurrency%2Ffuture.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fconcurrency%2Ffuture.hpp?ref=12fc5a5b124da487e5477825d1955e4bc9d83ecf","patch":"@@ -17,6 +17,7 @@\n #include <initializer_list>\n #include <memory>\n #include <mutex>\n+#include <optional>\n #include <vector>\n \n #ifndef STLAB_NO_STD_COROUTINES\n@@ -25,7 +26,6 @@\n \n #include <stlab/concurrency/executor_base.hpp>\n #include <stlab/concurrency/immediate_executor.hpp>\n-#include <stlab/concurrency/optional.hpp>\n #include <stlab/concurrency/task.hpp>\n #include <stlab/concurrency/traits.hpp>\n #include <stlab/concurrency/tuple_algorithm.hpp>\n@@ -259,7 +259,7 @@ struct shared_base<T, enable_if_copyable<T>> : std::enable_shared_from_this<shar\n     using then_t = std::vector<std::pair<executor_t, task<void() noexcept>>>;\n \n     executor_t _executor;\n-    stlab::optional<T> _result;\n+    std::optional<T> _result;\n     std::exception_ptr _exception;\n     std::mutex _mutex;\n     std::atomic_bool _ready{false};\n@@ -328,7 +328,7 @@ struct shared_base<T, enable_if_copyable<T>> : std::enable_shared_from_this<shar\n         return *_result;\n     }\n \n-    auto get_try() -> stlab::optional<T> {\n+    auto get_try() -> std::optional<T> {\n         bool ready = false;\n         {\n             std::unique_lock<std::mutex> lock(_mutex);\n@@ -338,10 +338,10 @@ struct shared_base<T, enable_if_copyable<T>> : std::enable_shared_from_this<shar\n             if (_exception) std::rethrow_exception(_exception);\n             return _result;\n         }\n-        return stlab::nullopt;\n+        return std::nullopt;\n     }\n \n-    auto get_try_r(bool unique) -> stlab::optional<T> {\n+    auto get_try_r(bool unique) -> std::optional<T> {\n         if (!unique) return get_try();\n \n         bool ready = false;\n@@ -353,7 +353,7 @@ struct shared_base<T, enable_if_copyable<T>> : std::enable_shared_from_this<shar\n             if (_exception) std::rethrow_exception(_exception);\n             return std::move(_result);\n         }\n-        return stlab::nullopt;\n+        return std::nullopt;\n     }\n };\n \n@@ -364,7 +364,7 @@ struct shared_base<T, enable_if_not_copyable<T>> : std::enable_shared_from_this<\n     using then_t = std::pair<executor_t, task<void() noexcept>>;\n \n     executor_t _executor;\n-    stlab::optional<T> _result;\n+    std::optional<T> _result;\n     std::exception_ptr _exception;\n     std::mutex _mutex;\n     std::atomic_bool _ready{false};\n@@ -418,9 +418,9 @@ struct shared_base<T, enable_if_not_copyable<T>> : std::enable_shared_from_this<\n \n     bool is_ready() const { return _ready; }\n \n-    auto get_try() -> stlab::optional<T> { return get_try_r(true); }\n+    auto get_try() -> std::optional<T> { return get_try_r(true); }\n \n-    auto get_try_r(bool) -> stlab::optional<T> {\n+    auto get_try_r(bool) -> std::optional<T> {\n         bool ready = false;\n         {\n             std::unique_lock<std::mutex> lock(_mutex);\n@@ -733,9 +733,9 @@ class STLAB_NODISCARD() future<T, enable_if_copyable<T>> {\n \n     auto get_try() && { return _p->get_try_r(unique_usage(_p)); }\n \n-    [[deprecated(\"Use exception() instead\")]] stlab::optional<std::exception_ptr> error() const& {\n-        return _p->_exception ? stlab::optional<std::exception_ptr>{_p->_exception} :\n-                                stlab::nullopt;\n+    [[deprecated(\"Use exception() instead\")]] std::optional<std::exception_ptr> error() const& {\n+        return _p->_exception ? std::optional<std::exception_ptr>{_p->_exception} :\n+                                std::nullopt;\n     }\n \n     std::exception_ptr exception() const& { return _p->_exception; }\n@@ -881,9 +881,9 @@ class STLAB_NODISCARD() future<void, void> {\n \n     bool get_try() const& { return _p->get_try(); }\n \n-    [[deprecated(\"Use exception() instead\")]] stlab::optional<std::exception_ptr> error() const& {\n-        return _p->_exception ? stlab::optional<std::exception_ptr>{_p->_exception} :\n-                                stlab::nullopt;\n+    [[deprecated(\"Use exception() instead\")]] std::optional<std::exception_ptr> error() const& {\n+        return _p->_exception ? std::optional<std::exception_ptr>{_p->_exception} :\n+                                std::nullopt;\n     }\n \n     std::exception_ptr exception() const& { return _p->_exception; }\n@@ -986,9 +986,9 @@ class STLAB_NODISCARD() future<T, enable_if_not_copyable<T>> {\n \n     auto get_try() && { return _p->get_try_r(unique_usage(_p)); }\n \n-    [[deprecated(\"Use exception() instead\")]] stlab::optional<std::exception_ptr> error() const& {\n-        return _p->_exception ? stlab::optional<std::exception_ptr>{_p->_exception} :\n-                                stlab::nullopt;\n+    [[deprecated(\"Use exception() instead\")]] std::optional<std::exception_ptr> error() const& {\n+        return _p->_exception ? std::optional<std::exception_ptr>{_p->_exception} :\n+                                std::nullopt;\n     }\n \n     std::exception_ptr exception() const& { return _p->_exception; }\n@@ -1076,7 +1076,7 @@ template <size_t S, typename R>\n struct when_any_shared {\n     using result_type = R;\n     // decay\n-    stlab::optional<R> _arg;\n+    std::optional<R> _arg;\n     std::mutex _guard;\n     future<void> _holds[S]{};\n     std::size_t _remaining{S};"},{"sha":"bfa98c13dfa7da3d000c241b93c92aab4ab1df15","filename":"stlab/concurrency/optional.hpp","status":"removed","additions":0,"deletions":57,"changes":57,"blob_url":"https://github.com/stlab/stlab/blob/4044ffa258244a94cfb89d17f82355569647a697/stlab%2Fconcurrency%2Foptional.hpp","raw_url":"https://github.com/stlab/stlab/raw/4044ffa258244a94cfb89d17f82355569647a697/stlab%2Fconcurrency%2Foptional.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fconcurrency%2Foptional.hpp?ref=4044ffa258244a94cfb89d17f82355569647a697","patch":"@@ -1,57 +0,0 @@\n-/*\n-    Copyright 2015 Adobe\n-    Distributed under the Boost Software License, Version 1.0.\n-    (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n-*/\n-\n-// The library can be used with boost::optional or std::optional. Usage of\n-// boost::optional is enabled when STLAB_USE_BOOST_CPP17_SHIMS is defined.\n-\n-/**************************************************************************************************/\n-\n-#ifndef STLAB_CONCURRENCY_OPTIONAL_HPP\n-#define STLAB_CONCURRENCY_OPTIONAL_HPP\n-\n-#include <stlab/config.hpp>\n-\n-/**************************************************************************************************/\n-\n-#include <stlab/config.hpp>\n-\n-#ifdef STLAB_USE_BOOST_CPP17_SHIMS\n-    #include <boost/optional.hpp>\n-#else\n-    #include <optional>\n-#endif\n-\n-/**************************************************************************************************/\n-\n-namespace stlab {\n-\n-/**************************************************************************************************/\n-\n-#ifndef STLAB_USE_BOOST_CPP17_SHIMS\n-\n-template <typename T>\n-using optional = std::optional<T>;\n-\n-constexpr std::nullopt_t nullopt{std::nullopt};\n-\n-/**************************************************************************************************/\n-\n-#else\n-\n-template <typename T>\n-using optional = boost::optional<T>;\n-\n-const boost::none_t nullopt((boost::none_t::init_tag()));\n-\n-#endif\n-\n-/**************************************************************************************************/\n-\n-} // namespace stlab\n-\n-/**************************************************************************************************/\n-\n-#endif // STLAB_CONCURRENCY_OPTIONAL_HPP"},{"sha":"327d42f4456d5edeb45e1ffebfba0905e13af30b","filename":"stlab/concurrency/tuple_algorithm.hpp","status":"modified","additions":3,"deletions":4,"changes":7,"blob_url":"https://github.com/stlab/stlab/blob/12fc5a5b124da487e5477825d1955e4bc9d83ecf/stlab%2Fconcurrency%2Ftuple_algorithm.hpp","raw_url":"https://github.com/stlab/stlab/raw/12fc5a5b124da487e5477825d1955e4bc9d83ecf/stlab%2Fconcurrency%2Ftuple_algorithm.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fconcurrency%2Ftuple_algorithm.hpp?ref=12fc5a5b124da487e5477825d1955e4bc9d83ecf","patch":"@@ -10,9 +10,8 @@\n #ifndef STLAB_CONCURRENCY_TUPLE_ALGORITHM_HPP\n #define STLAB_CONCURRENCY_TUPLE_ALGORITHM_HPP\n \n-#include <stlab/concurrency/optional.hpp>\n-\n // stdc++\n+#include <optional>\n #include <tuple>\n \n /**************************************************************************************************/\n@@ -185,7 +184,7 @@ struct map_placeholder<placeholder, N> {\n };\n \n template <std::size_t N>\n-struct map_placeholder<stlab::optional<placeholder>, N> {\n+struct map_placeholder<std::optional<placeholder>, N> {\n     using type = std::index_sequence<>;\n };\n \n@@ -225,7 +224,7 @@ using placeholder_tuple = std::tuple<\n // type-function that takes a parameter pack and returns a std::tuple<Ts...>\n // where all T[i] = void have been replaced with stlab::placeholder.\n template <typename... Ts>\n-using optional_placeholder_tuple = std::tuple<stlab::optional<\n+using optional_placeholder_tuple = std::tuple<std::optional<\n     typename std::conditional<std::is_same<void, Ts>::value, detail::placeholder, Ts>::type>...>;\n \n /**************************************************************************************************/"},{"sha":"8d65be726bb1ad804d97507a5e9422659842e5f2","filename":"stlab/concurrency/variant.hpp","status":"removed","additions":0,"deletions":99,"changes":99,"blob_url":"https://github.com/stlab/stlab/blob/4044ffa258244a94cfb89d17f82355569647a697/stlab%2Fconcurrency%2Fvariant.hpp","raw_url":"https://github.com/stlab/stlab/raw/4044ffa258244a94cfb89d17f82355569647a697/stlab%2Fconcurrency%2Fvariant.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fconcurrency%2Fvariant.hpp?ref=4044ffa258244a94cfb89d17f82355569647a697","patch":"@@ -1,99 +0,0 @@\n-/*\n-    Copyright 2015 Adobe\n-    Distributed under the Boost Software License, Version 1.0.\n-    (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n-*/\n-\n-// The library can be used with boost::variant or std::variant. Usage of\n-// boost::variant is enabled when STLAB_USE_BOOST_CPP17_SHIMS is defined.\n-\n-/**************************************************************************************************/\n-\n-#ifndef STLAB_CONCURRENCY_VARIANT_HPP\n-#define STLAB_CONCURRENCY_VARIANT_HPP\n-\n-/**************************************************************************************************/\n-\n-#ifdef STLAB_USE_BOOST_CPP17_SHIMS\n-    #include <boost/variant.hpp>\n-#else\n-    #include <variant>\n-#endif\n-\n-/**************************************************************************************************/\n-\n-namespace stlab {\n-\n-/**************************************************************************************************/\n-\n-#ifndef STLAB_USE_BOOST_CPP17_SHIMS\n-\n-template <typename... T>\n-using variant = std::variant<T...>;\n-\n-template <class T, class... Types>\n-constexpr T& get(std::variant<Types...>& v) {\n-    return std::get<T>(v);\n-}\n-\n-template <class T, class... Types>\n-constexpr T&& get(std::variant<Types...>&& v) {\n-    return std::get<T>(std::move(v));\n-}\n-\n-template <class T, class... Types>\n-constexpr const T& get(const std::variant<Types...>& v) {\n-    return std::get<T>(v);\n-}\n-\n-template <class T, class... Types>\n-constexpr const T&& get(const std::variant<Types...>&& v) {\n-    return std::get<T>(std::move(v));\n-}\n-\n-template <typename... Types>\n-constexpr auto index(const std::variant<Types...>& v) {\n-    return v.index();\n-}\n-\n-/**************************************************************************************************/\n-\n-#else\n-\n-template <typename... T>\n-using variant = boost::variant<T...>;\n-\n-template <class T, class... Types>\n-constexpr T& get(boost::variant<Types...>& v) {\n-    return boost::get<T>(v);\n-}\n-\n-template <class T, std::size_t I, typename... Types>\n-constexpr T& get(boost::variant<Types...>& v) {\n-    return boost::get<I>(v);\n-}\n-\n-template <class T, class... Types>\n-constexpr const T& get(const boost::variant<Types...>& v) {\n-    return boost::get<T>(v);\n-}\n-\n-template <class T, std::size_t I, typename... Types>\n-constexpr const T&& get(const boost::variant<Types...>&& v) {\n-    return boost::get<I>(std::forward<Types...>(v));\n-}\n-\n-template <typename... Types>\n-constexpr auto index(const boost::variant<Types...>& v) {\n-    return v.which();\n-}\n-\n-#endif\n-\n-/**************************************************************************************************/\n-\n-} // namespace stlab\n-\n-/**************************************************************************************************/\n-\n-#endif // STLAB_CONCURRENCY_VARIANT_HPP"},{"sha":"5b4b85a3d975f91883bf71b3b8ba5b268efdf8ea","filename":"stlab/config.hpp.in","status":"modified","additions":0,"deletions":1,"changes":1,"blob_url":"https://github.com/stlab/stlab/blob/12fc5a5b124da487e5477825d1955e4bc9d83ecf/stlab%2Fconfig.hpp.in","raw_url":"https://github.com/stlab/stlab/raw/12fc5a5b124da487e5477825d1955e4bc9d83ecf/stlab%2Fconfig.hpp.in","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fconfig.hpp.in?ref=12fc5a5b124da487e5477825d1955e4bc9d83ecf","patch":"@@ -9,7 +9,6 @@\n \n // Configuration generated from CMake\n \n-#cmakedefine STLAB_USE_BOOST_CPP17_SHIMS\n #cmakedefine STLAB_NO_STD_COROUTINES\n \n #define STLAB_THREADS(X) (STLAB_THREADS_##X())"},{"sha":"080676d6f0924bd8c94a7bbd0af2e2e1abe4d41e","filename":"stlab/forest_algorithms.hpp","status":"modified","additions":5,"deletions":3,"changes":8,"blob_url":"https://github.com/stlab/stlab/blob/12fc5a5b124da487e5477825d1955e4bc9d83ecf/stlab%2Fforest_algorithms.hpp","raw_url":"https://github.com/stlab/stlab/raw/12fc5a5b124da487e5477825d1955e4bc9d83ecf/stlab%2Fforest_algorithms.hpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/stlab%2Fforest_algorithms.hpp?ref=12fc5a5b124da487e5477825d1955e4bc9d83ecf","patch":"@@ -5,8 +5,10 @@\n \n /**************************************************************************************************/\n \n+// stdc++\n+#include <optional>\n+\n // stlab\n-#include <stlab/concurrency/optional.hpp>\n #include <stlab/forest.hpp>\n \n /**************************************************************************************************/\n@@ -115,15 +117,15 @@ auto flatten(I first, I last, O out) {\n         if (is_leading(first)) {\n             *out++ = *first;\n         } else {\n-            *out++ = nullopt;\n+            *out++ = std::nullopt;\n         }\n     }\n     return out;\n }\n \n /**************************************************************************************************/\n \n-template <class I, // I models ForwardIterator; I::value_type == stlab::optional<T>\n+template <class I, // I models ForwardIterator; I::value_type == std::optional<T>\n           class F> // F models Forest\n auto unflatten(I first, I last, F& f) {\n     return forests::transcribe("},{"sha":"edc623b518658186ebbf073062bc95c0b88f76f0","filename":"test/forest_test.cpp","status":"modified","additions":3,"deletions":2,"changes":5,"blob_url":"https://github.com/stlab/stlab/blob/12fc5a5b124da487e5477825d1955e4bc9d83ecf/test%2Fforest_test.cpp","raw_url":"https://github.com/stlab/stlab/raw/12fc5a5b124da487e5477825d1955e4bc9d83ecf/test%2Fforest_test.cpp","contents_url":"https://api.github.com/repos/stlab/stlab/contents/test%2Fforest_test.cpp?ref=12fc5a5b124da487e5477825d1955e4bc9d83ecf","patch":"@@ -2,6 +2,7 @@\n \n // stdc++\n #include <iostream>\n+#include <optional>\n \n // boost\n #include <boost/test/unit_test.hpp>\n@@ -130,7 +131,7 @@ auto to_string(const std::string& x) {\n }\n \n template <>\n-auto to_string(const stlab::optional<std::string>& x) {\n+auto to_string(const std::optional<std::string>& x) {\n     return x ? to_string(*x) : \"?\";\n }\n \n@@ -463,7 +464,7 @@ BOOST_AUTO_TEST_CASE(test_transcribe_forest) {\n \n BOOST_AUTO_TEST_CASE(test_flatten) {\n     auto f1{big_test_forest()};\n-    std::vector<stlab::optional<std::string>> flat;\n+    std::vector<std::optional<std::string>> flat;\n \n     forests::flatten(f1.begin(), f1.end(), std::back_inserter(flat));\n "}]}