|
346 | 346 | class my_service : public execution_context::service
|
347 | 347 | {
|
348 | 348 | public:
|
349 |
| - typedef my_service key_type; |
| 349 | + using key_type = my_service; |
350 | 350 | explicit my_service(execution_context& ctx);
|
351 | 351 | my_service(execution_context& ctx, int some_value);
|
352 | 352 | private:
|
|
768 | 768 | class async_result
|
769 | 769 | {
|
770 | 770 | public:
|
771 |
| - typedef CompletionToken completion_handler_type; |
772 |
| - typedef void return_type; |
| 771 | + using completion_handler_type = CompletionToken; |
| 772 | + using return_type = void; |
773 | 773 |
|
774 | 774 | explicit async_result(completion_handler_type&) {}
|
775 | 775 | async_result(const async_result&) = delete;
|
|
841 | 841 | template<class CompletionToken, class Signature>
|
842 | 842 | struct async_completion
|
843 | 843 | {
|
844 |
| - typedef async_result<decay_t<CompletionToken>, |
845 |
| - Signature>::completion_handler_type |
846 |
| - completion_handler_type; |
| 844 | + using completion_handler_type = async_result<decay_t<CompletionToken>, |
| 845 | + Signature>::completion_handler_type; |
847 | 846 |
|
848 | 847 | explicit async_completion(CompletionToken& t);
|
849 | 848 | async_completion(const async_completion&) = delete;
|
|
897 | 896 | template<class T, class ProtoAllocator = allocator<void>>
|
898 | 897 | struct associated_allocator
|
899 | 898 | {
|
900 |
| - typedef @\seebelow@ type; |
| 899 | + using type = @\seebelow@; |
901 | 900 |
|
902 | 901 | static type get(const T& t, const ProtoAllocator& a = ProtoAllocator()) noexcept;
|
903 | 902 | };
|
|
945 | 944 | \rSec2[async.assoc.alloc.members]{\tcode{associated_allocator} members}
|
946 | 945 |
|
947 | 946 | \begin{itemdecl}
|
948 |
| -typedef @\seebelow@ type; |
| 947 | +using type = @\seebelow@; |
949 | 948 | \end{itemdecl}
|
950 | 949 |
|
951 | 950 | \begin{itemdescr}
|
|
1349 | 1348 | template<class T, class Executor = system_executor>
|
1350 | 1349 | struct associated_executor
|
1351 | 1350 | {
|
1352 |
| - typedef @\seebelow@ type; |
| 1351 | + using type = @\seebelow@; |
1353 | 1352 |
|
1354 | 1353 | static type get(const T& t, const Executor& e = Executor()) noexcept;
|
1355 | 1354 | };
|
|
1397 | 1396 | \rSec2[async.assoc.exec.members]{\tcode{associated_executor} members}
|
1398 | 1397 |
|
1399 | 1398 | \begin{itemdecl}
|
1400 |
| -typedef @\seebelow@ type; |
| 1399 | +using type = @\seebelow@; |
1401 | 1400 | \end{itemdecl}
|
1402 | 1401 |
|
1403 | 1402 | \begin{itemdescr}
|
|
1478 | 1477 | public:
|
1479 | 1478 | // types:
|
1480 | 1479 |
|
1481 |
| - typedef T target_type; |
1482 |
| - typedef Executor executor_type; |
| 1480 | + using target_type = T; |
| 1481 | + using executor_type = Executor; |
1483 | 1482 |
|
1484 | 1483 | // construct / copy / destroy:
|
1485 | 1484 |
|
|
1657 | 1656 | class async_result<executor_binder<T, Executor>, Signature>
|
1658 | 1657 | {
|
1659 | 1658 | public:
|
1660 |
| - typedef executor_binder< |
| 1659 | + using completion_handler_type = executor_binder< |
1661 | 1660 | typename async_result<T, Signature>::completion_handler_type,
|
1662 |
| - Executor> completion_handler_type; |
1663 |
| - typedef typename async_result<T, Signature>::return_type return_type; |
| 1661 | + Executor>; |
| 1662 | + using return_type = typename async_result<T, Signature>::return_type; |
1664 | 1663 |
|
1665 | 1664 | explicit async_result(completion_handler_type& h);
|
1666 | 1665 | async_result(const async_result&) = delete;
|
|
1711 | 1710 | template<class T, class Executor, class ProtoAllocator>
|
1712 | 1711 | struct associated_allocator<executor_binder<T, Executor>, ProtoAllocator>
|
1713 | 1712 | {
|
1714 |
| - typedef associated_allocator_t<T, ProtoAllocator> type; |
| 1713 | + using type = associated_allocator_t<T, ProtoAllocator>; |
1715 | 1714 |
|
1716 | 1715 | static type get(const executor_binder<T, Executor>& b,
|
1717 | 1716 | const ProtoAllocator& a = ProtoAllocator()) noexcept;
|
|
1748 | 1747 | template<class T, class Executor, class Executor1>
|
1749 | 1748 | struct associated_executor<executor_binder<T, Executor>, Executor1>
|
1750 | 1749 | {
|
1751 |
| - typedef Executor type; |
| 1750 | + using type = Executor; |
1752 | 1751 |
|
1753 | 1752 | static type get(const executor_binder<T, Executor>& b,
|
1754 | 1753 | const Executor1& e = Executor1()) noexcept;
|
|
1822 | 1821 | public:
|
1823 | 1822 | // types:
|
1824 | 1823 |
|
1825 |
| - typedef Executor executor_type; |
| 1824 | + using executor_type = Executor; |
1826 | 1825 |
|
1827 | 1826 | // construct / copy / destroy:
|
1828 | 1827 |
|
|
2131 | 2130 | public:
|
2132 | 2131 | // types:
|
2133 | 2132 |
|
2134 |
| - typedef system_executor executor_type; |
| 2133 | + using executor_type = system_executor; |
2135 | 2134 |
|
2136 | 2135 | // construct / copy / destroy:
|
2137 | 2136 |
|
|
2990 | 2989 | public:
|
2991 | 2990 | // types:
|
2992 | 2991 |
|
2993 |
| - typedef Executor inner_executor_type; |
| 2992 | + using inner_executor_type = Executor; |
2994 | 2993 |
|
2995 | 2994 | // construct / copy / destroy:
|
2996 | 2995 |
|
|
3407 | 3406 | {
|
3408 | 3407 | public:
|
3409 | 3408 | // use_future_t types:
|
3410 |
| - typedef ProtoAllocator allocator_type; |
| 3409 | + using allocator_type = ProtoAllocator; |
3411 | 3410 |
|
3412 | 3411 | // use_future_t members:
|
3413 | 3412 | constexpr use_future_t() noexcept(noexcept(allocator_type()));
|
|
3493 | 3492 | The implementation provides a partial specialization \tcode{template <class Result, class... Args> async_result<T, Result(Args...)>} such that:
|
3494 | 3493 | \begin{itemize}
|
3495 | 3494 | \item
|
3496 |
| - the nested typedef \tcode{completion_handler_type} is a type \tcode{H}; |
| 3495 | + the nested type \tcode{completion_handler_type} is a type \tcode{H}; |
3497 | 3496 | \item
|
3498 |
| - the nested typedef \tcode{return_type} is \tcode{future<result_of_t<FD(decay_t<Args>...)>>}; and |
| 3497 | + the nested type \tcode{return_type} is \tcode{future<result_of_t<FD(decay_t<Args>...)>>}; and |
3499 | 3498 | \item
|
3500 | 3499 | when an object \tcode{r1} of type \tcode{async_result<T, Result(Args...)>} is constructed from \tcode{h}, the expression \tcode{r1.get()} returns a future with the same shared state as \tcode{h}.
|
3501 | 3500 | \end{itemize}
|
|
3515 | 3514 | template<class ProtoAllocator, class Result, class... Args>
|
3516 | 3515 | class async_result<use_future_t<ProtoAllocator>, Result(Args...)>
|
3517 | 3516 | {
|
3518 |
| - typedef @\seebelow@ completion_handler_type; |
3519 |
| - typedef @\seebelow@ return_type; |
| 3517 | + using completion_handler_type = @\seebelow@; |
| 3518 | + using return_type = @\seebelow@; |
3520 | 3519 |
|
3521 | 3520 | explicit async_result(completion_handler_type& h);
|
3522 | 3521 | async_result(const async_result&) = delete;
|
|
3629 | 3628 | class async_result<packaged_task<Result(Args...)>, Signature>
|
3630 | 3629 | {
|
3631 | 3630 | public:
|
3632 |
| - typedef packaged_task<Result(Args...)> completion_handler_type; |
3633 |
| - typedef future<Result> return_type; |
| 3631 | + using completion_handler_type = packaged_task<Result(Args...)>; |
| 3632 | + using return_type = future<Result>; |
3634 | 3633 |
|
3635 | 3634 | explicit async_result(completion_handler_type& h);
|
3636 | 3635 | async_result(const async_result&) = delete;
|
|
0 commit comments