548 Commits

Author SHA1 Message Date
Denis Blank
25fad02a9d Some ideas 2019-04-04 07:04:12 +02:00
Denis Blank
d842c14268 Re-enable the converting constructor of continuable_base
* Probably a forgotten leftover from debugging
  mainly responsible for more efficient conversions only.
2019-03-19 17:06:58 +01:00
Denis Blank
e9be3eb8c3 Improved the coroutine support auto detection on MSVC
* Based on _RESUMABLE_FUNCTIONS_SUPPORTED inspired from asio.
2019-03-15 17:11:38 +01:00
Denis Blank
67d77808dc Fix the GCC build after bc4d69735 2019-03-12 14:44:15 +01:00
Denis Blank
03ae1b5c45 Update function2 to Naios/function2@e3695b4 2019-03-12 14:43:50 +01:00
Denis Blank
bc4d69735c Improve cti::split and make it workable with plain callbacks 2019-03-11 16:39:35 +01:00
Denis Blank
daa2fdd686 Implement cti::split which makes it possible to resolve multiple
asynchronous control flows from a single promise.
2019-03-08 22:06:44 +01:00
Denis Blank
41f3429c85 Remove some using expressions
* Those caused issues in namespaces where symbols were preloaded
* Formatting fixes
2019-03-08 20:18:26 +01:00
Denis Blank
6b4f6de10f Use the work erased type directly in release builds
* So this behaviour aligns to the one used in continuable_base and promise_base.
2019-03-08 18:27:57 +01:00
Denis Blank
fdd9a061c4 Make promise_base default constructible
* This makes it possible to use promise_base for optional
  promises directly rather than wrapping it as optional<promise_base<...>>.
* Invalidate the promise_base after its first usage.
* Expose an `operator bool()` to make the validility accessible.
* Remove the no longer needed private promise_no_init_arg_t tag.
2019-03-08 18:13:40 +01:00
Denis Blank
2bc448b905 Link the MeetingC++ talk in the readme 2019-02-26 16:01:20 +01:00
Denis Blank
e23e363b03 Add a conanfile
* Closes #12
2019-01-29 20:28:09 +01:00
Denis Blank
d72e1bfb86 Implement async_on for asynchronous execution on a specific executor
* Makes it possible to specify an executor in addition to
  the arguments passed to async.
* The reason why async should not support this directly is
  that it should be closely modelled to std::async.
2019-01-26 03:46:39 +01:00
Denis Blank
fa589a1e95 Document range_loop 2019-01-14 23:14:29 +01:00
Denis Blank
20cd0191fc For loops provide loop_result loop_break and loop_continue for better readability 2019-01-14 23:13:23 +01:00
Denis Blank
76ecc3d26d Attempt to fix the build 2019-01-14 21:10:25 +01:00
Denis Blank
7491022d0f Implement make_plain to make it possible to not handle special objects in handlers 2019-01-14 21:02:22 +01:00
Denis Blank
4c807aec75 Update a deprecation message 2019-01-14 18:13:22 +01:00
Denis Blank
60b75a6134 Finish the async implementation 2019-01-14 18:07:37 +01:00
Denis Blank
b86fe7a255 Additional work on async 2019-01-13 19:10:55 +01:00
Denis Blank
a4da3e84ef Fix the range_loop build 2019-01-13 18:52:13 +01:00
Denis Blank
ac175b4e57 Start to implement the unit tests for loop and add range_loop 2019-01-13 18:19:49 +01:00
Denis Blank
135ebfccf3 Start to implement loop and async 2019-01-13 17:05:28 +01:00
Denis Blank
5c1cd87739 Doc improvement 2019-01-06 14:05:54 +01:00
Denis Blank
20e8c7d3e3 Reflow the license text
* For some reason some spaces were removed,
  the license text and content stays the same.
2019-01-04 13:39:46 +01:00
Denis Blank
a3a9695174 Happy new year! 2019-01-04 13:35:44 +01:00
Denis Blank
c066940d8d Use new types instead of aliases for type erasures
* Makes compiler output much more readable
  This is configurateable through CONTINUABLE_WITH_IMMEDIATE_TYPES,
  and automatically enabled for debug builds but disabled
  for release builds.
* Remove the old continuable-trait.hpp header
* Make the signature of continuable not dependent anymore
  on any size of the arguments which fixes the compilation
  with forward declared types.
  Thanks Rogiel for the correspoding bug report.
  Closes #11
2019-01-04 13:12:48 +01:00
Denis Blank
2d5aa36b67 Update function2 to Naios/function2@d2acdb6 2019-01-04 12:59:25 +01:00
Denis Blank
3bd4dd40de Fixate the args of the final callback
* Also allow to customize it through the
  CONTINUABLE_WITH_CUSTOM_FINAL_CALLBACK define.
  This can be used to implement custom unhandled
  exception handlers and more.
2018-12-29 06:25:49 +01:00
Denis Blank
a099c504e1 Workaround for a MSVC required symbol link bug 2018-12-26 06:20:48 +01:00
Denis Blank
7a10363dce Implement continuable_base<...>::as
* Can convert continuables to other compatible signatures
2018-12-26 05:38:10 +01:00
Denis Blank
30f0dca27f Fix a unit test introduced in 4127c02c3f6d 2018-12-25 11:15:06 +01:00
Denis Blank
d4cb7dd7b3 Only disable specific top level project settings
* When being not being inside in a top level project
2018-12-25 09:35:20 +01:00
Denis Blank
f469b7058a Implement make_cancelling_continuable()
* Can be used to cancel the chain when being inside a handler
2018-12-25 09:30:23 +01:00
Denis Blank
4127c02c3f Add an overload to make_result which accepts a exception_arg_t and exception_t
* Can be used to forward the result correctly from next handlers
2018-12-25 09:05:51 +01:00
Denis Blank
d052a02595 Remove a bad GCC diagnostic pop when using result<...> and GCC 2018-12-25 08:42:42 +01:00
Denis Blank
7dbc95c4b3 Implement zero cost ready continuables for await expressions 2018-12-16 04:25:56 +01:00
Denis Blank
fcf9a76029 Set the minimum required CMake version to 3.11
* Make travis-ci install a recent CMake version
* Update function2
2018-12-12 17:46:16 +01:00
Denis Blank
49e3a659ad Rework the find_package() support
* It is now possible to include the repository correctly
  through add_subdirectory
* find_package(continuable) was improved to work when
  only the path of the repository was added to the module path.
2018-12-11 04:30:58 +01:00
Denis Blank
65916e29a8 Update function2 to Naios/function2@2b3bc42 2018-12-11 04:29:24 +01:00
Denis Blank
121265df71 Cleanup in result<> 2018-12-11 01:21:26 +01:00
Denis Blank
4c41995316 Document recover, rethrow and cancel
* Closes #9
2018-12-11 01:21:09 +01:00
Denis Blank
dd09c3d684 Bump the version to 4.0.0 2018-12-10 18:08:29 +01:00
Denis Blank
ff881091fc Update function2 to Naios/function2@1dd435d 2018-12-10 06:27:15 +01:00
Denis Blank
30d49141a8 Resolve ready continuables directly in sequential connections 2018-12-10 06:22:53 +01:00
Denis Blank
c7ef5c6f64 Adhust the SFO buffer size so it can contain a pointer at zero cost 2018-12-10 06:07:43 +01:00
Denis Blank
b2726982ac Fix the build when coroutines are enabled 2018-12-10 06:03:46 +01:00
Denis Blank
57bb43138b Fix a recursive template instantiation issue on clang and gcc 2018-12-10 05:08:39 +01:00
Denis Blank
1320c8eb63 Add a unit test which tests for ready continuables explicitly 2018-12-09 17:01:56 +01:00
Denis Blank
1bdee5b371 Remove an unused using 2018-12-09 16:49:03 +01:00