|
905 | 905 |
|
906 | 906 | void swap(pair& p) noexcept(@\seebelow@);
|
907 | 907 | };
|
| 908 | + |
| 909 | + template<class T1, class T2> |
| 910 | + pair(T1, T2) -> pair<T1, T2>; |
908 | 911 | }
|
909 | 912 | \end{codeblock}
|
910 | 913 |
|
|
1542 | 1545 | // \ref{tuple.swap}, \tcode{tuple} swap
|
1543 | 1546 | void swap(tuple&) noexcept(@\seebelow@);
|
1544 | 1547 | };
|
| 1548 | + |
| 1549 | + template<class... UTypes> |
| 1550 | + tuple(UTypes...) -> tuple<UTypes...>; |
| 1551 | + template<class T1, class T2> |
| 1552 | + tuple(pair<T1, T2>) -> tuple<T1, T2>; |
| 1553 | + template<class Alloc, class... UTypes> |
| 1554 | + tuple(allocator_arg_t, Alloc, UTypes...) -> tuple<UTypes...>; |
| 1555 | + template<class Alloc, class T1, class T2> |
| 1556 | + tuple(allocator_arg_t, Alloc, pair<T1, T2>) -> tuple<T1, T2>; |
| 1557 | + template<class Alloc, class... UTypes> |
| 1558 | + tuple(allocator_arg_t, Alloc, tuple<UTypes...>) -> tuple<UTypes...>; |
1545 | 1559 | }
|
1546 | 1560 | \end{codeblock}
|
1547 | 1561 |
|
|
2632 | 2646 | private:
|
2633 | 2647 | T *val; // \expos
|
2634 | 2648 | };
|
| 2649 | + |
| 2650 | +template<class T> optional(T) -> optional<T>; |
2635 | 2651 | \end{codeblock}
|
2636 | 2652 |
|
2637 | 2653 | \pnum
|
|
8485 | 8501 | \pnum
|
8486 | 8502 | \remarks If this constructor is instantiated with a pointer type or reference type
|
8487 | 8503 | for the template argument \tcode{D}, the program is ill-formed.
|
| 8504 | +If class template argument deduction~(\ref{over.match.class.deduct}) |
| 8505 | +would select the function template corresponding to this constructor, |
| 8506 | +then the program is ill-formed. |
8488 | 8507 | \end{itemdescr}
|
8489 | 8508 |
|
8490 | 8509 | \indexlibrary{\idxcode{unique_ptr}!constructor}%
|
|
8570 | 8589 | deleter. If \tcode{D} is a reference type then \tcode{get_deleter()}
|
8571 | 8590 | returns a reference to the lvalue \tcode{d}.
|
8572 | 8591 |
|
| 8592 | +\remarks If class template argument deduction~(\ref{over.match.class.deduct}) |
| 8593 | +would select a function template corresponding to either of these constructors, |
| 8594 | +then the program is ill-formed. |
| 8595 | + |
8573 | 8596 | \begin{example}
|
8574 | 8597 |
|
8575 | 8598 | \begin{codeblock}
|
|
9397 | 9420 | template<class U> bool owner_before(const weak_ptr<U>& b) const;
|
9398 | 9421 | };
|
9399 | 9422 |
|
| 9423 | + template<class T> shared_ptr(weak_ptr<T>) -> shared_ptr<T>; |
| 9424 | + template<class T, class D> shared_ptr(unique_ptr<T, D>) -> shared_ptr<T>; |
| 9425 | + |
9400 | 9426 | // \ref{util.smartptr.shared.create}, \tcode{shared_ptr} creation
|
9401 | 9427 | template<class T, class... Args>
|
9402 | 9428 | shared_ptr<T> make_shared(Args&&... args);
|
|
10312 | 10338 | template<class U> bool owner_before(const weak_ptr<U>& b) const;
|
10313 | 10339 | };
|
10314 | 10340 |
|
| 10341 | + template<class T> weak_ptr(shared_ptr<T>) -> weak_ptr<T>; |
| 10342 | + |
| 10343 | + |
10315 | 10344 | // \ref{util.smartptr.weak.spec}, specialized algorithms
|
10316 | 10345 | template<class T> void swap(weak_ptr<T>& a, weak_ptr<T>& b) noexcept;
|
10317 | 10346 | }
|
|
12208 | 12237 | scoped_allocator_adaptor select_on_container_copy_construction() const;
|
12209 | 12238 | };
|
12210 | 12239 |
|
| 12240 | + template<class OuterAlloc, class... InnerAllocs> |
| 12241 | + scoped_allocator_adaptor(OuterAlloc, InnerAllocs...) |
| 12242 | + -> scoped_allocator_adaptor<OuterAlloc, InnerAllocs...>; |
| 12243 | + |
12211 | 12244 | template <class OuterA1, class OuterA2, class... InnerAllocs>
|
12212 | 12245 | bool operator==(const scoped_allocator_adaptor<OuterA1, InnerAllocs...>& a,
|
12213 | 12246 | const scoped_allocator_adaptor<OuterA2, InnerAllocs...>& b) noexcept;
|
|
12831 | 12864 | class BinaryPredicate = equal_to<>>
|
12832 | 12865 | class boyer_moore_horspool_searcher;
|
12833 | 12866 |
|
12834 |
| - template<class ForwardIterator, class BinaryPredicate = equal_to<>> |
12835 |
| - default_searcher<ForwardIterator, BinaryPredicate> |
12836 |
| - make_default_searcher( |
12837 |
| - ForwardIterator pat_first, |
12838 |
| - ForwardIterator pat_last, |
12839 |
| - BinaryPredicate pred = BinaryPredicate()); |
12840 |
| - |
12841 |
| - template<class RandomAccessIterator, |
12842 |
| - class Hash = hash<typename iterator_traits<RandomAccessIterator>::value_type>, |
12843 |
| - class BinaryPredicate = equal_to<>> |
12844 |
| - boyer_moore_searcher<RandomAccessIterator, Hash, BinaryPredicate> |
12845 |
| - make_boyer_moore_searcher( |
12846 |
| - RandomAccessIterator pat_first, |
12847 |
| - RandomAccessIterator pat_last, |
12848 |
| - Hash hf = Hash(), |
12849 |
| - BinaryPredicate pred = BinaryPredicate()); |
12850 |
| - |
12851 |
| - template<class RandomAccessIterator, |
12852 |
| - class Hash = hash<typename iterator_traits<RandomAccessIterator>::value_type>, |
12853 |
| - class BinaryPredicate = equal_to<>> |
12854 |
| - boyer_moore_horspool_searcher<RandomAccessIterator, Hash, BinaryPredicate> |
12855 |
| - make_boyer_moore_horspool_searcher( |
12856 |
| - RandomAccessIterator pat_first, |
12857 |
| - RandomAccessIterator pat_last, |
12858 |
| - Hash hf = Hash(), |
12859 |
| - BinaryPredicate pred = BinaryPredicate()); |
12860 |
| - |
12861 | 12867 | // \ref{unord.hash}, hash function primary template
|
12862 | 12868 | template <class T>
|
12863 | 12869 | struct hash;
|
|
13041 | 13047 | result_of_t<T&(ArgTypes&&...)>
|
13042 | 13048 | operator() (ArgTypes&&...) const;
|
13043 | 13049 | };
|
| 13050 | + |
| 13051 | + template<class T> |
| 13052 | + reference_wrapper(reference_wrapper<T>) -> reference_wrapper<T>; |
13044 | 13053 | }
|
13045 | 13054 | \end{codeblock}
|
13046 | 13055 |
|
|
14343 | 14352 | const type_info& target_type() const noexcept;
|
14344 | 14353 | template<class T> T* target() noexcept;
|
14345 | 14354 | template<class T> const T* target() const noexcept;
|
14346 |
| - |
14347 | 14355 | };
|
14348 | 14356 |
|
| 14357 | + template<class R, class... ArgTypes> |
| 14358 | + function(R(*)(ArgTypes...)) -> function<R(ArgTypes...)>; |
| 14359 | + |
| 14360 | + template<class F> function(F) -> function<@\seebelow@>; |
| 14361 | + |
14349 | 14362 | // \ref{func.wrap.func.nullptr}, Null pointer comparisons
|
14350 | 14363 | template <class R, class... ArgTypes>
|
14351 | 14364 | bool operator==(const function<R(ArgTypes...)>&, nullptr_t) noexcept;
|
|
14387 | 14400 | wrapper~(\ref{func.def}) whose call signature~(\ref{func.def})
|
14388 | 14401 | is \tcode{R(ArgTypes...)}.
|
14389 | 14402 |
|
| 14403 | +\pnum |
| 14404 | +\begin{note} |
| 14405 | +The types deduced by the deduction guides for \tcode{function} |
| 14406 | +may change in future versions of this International Standard. |
| 14407 | +\end{note} |
| 14408 | + |
14390 | 14409 | \rSec4[func.wrap.func.con]{\tcode{function} construct/copy/destroy}
|
14391 | 14410 |
|
14392 | 14411 | \indexlibrary{\idxcode{function}!constructor}%
|
|
14491 | 14510 | or move constructor.
|
14492 | 14511 | \end{itemdescr}
|
14493 | 14512 |
|
| 14513 | + |
| 14514 | +\begin{itemdecl} |
| 14515 | +template<class F> function(F) -> function<@\seebelow@>; |
| 14516 | +\end{itemdecl} |
| 14517 | + |
| 14518 | +\begin{itemdescr} |
| 14519 | +\pnum |
| 14520 | +\remarks This deduction guide participates in overload resolution only if |
| 14521 | +\tcode{\&F::operator()} is well-formed when treated as an unevaluated operand. |
| 14522 | +In that case, if \tcode{decltype(\&F::operator())} is of the form |
| 14523 | +\tcode{R(G::*)(A...)}~\cv{}~\tcode{\&\opt{}~noexcept\opt} |
| 14524 | +for a class type \tcode{G}, then the deduced type is \tcode{function<R(A...)>}. |
| 14525 | + |
| 14526 | +\pnum |
| 14527 | +\begin{example} |
| 14528 | +\begin{codeblock} |
| 14529 | +void f() { |
| 14530 | + int i{5}; |
| 14531 | + function g = [&](double) { return i; }; // deduces \tcode{function<int(double)>} |
| 14532 | +} |
| 14533 | +\end{codeblock} |
| 14534 | +\end{example} |
| 14535 | +\end{itemdescr} |
| 14536 | + |
14494 | 14537 | \indexlibrarymember{operator=}{function}%
|
14495 | 14538 | \begin{itemdecl}
|
14496 | 14539 | function& operator=(const function& f);
|
|
14762 | 14805 | \end{itemize}
|
14763 | 14806 | \end{itemdescr}
|
14764 | 14807 |
|
14765 |
| -\rSec4[func.search.default.creation]{\tcode{default_searcher} creation functions} |
14766 |
| - |
14767 |
| -\indexlibrary{\idxcode{make_default_searcher}}% |
14768 |
| -\begin{itemdecl} |
14769 |
| -template <class ForwardIterator, class BinaryPredicate = equal_to<>> |
14770 |
| - default_searcher<ForwardIterator, BinaryPredicate> |
14771 |
| - make_default_searcher(ForwardIterator pat_first, ForwardIterator pat_last, |
14772 |
| - BinaryPredicate pred = BinaryPredicate()); |
14773 |
| -\end{itemdecl} |
14774 |
| - |
14775 |
| -\begin{itemdescr} |
14776 |
| -\pnum |
14777 |
| -\effects |
14778 |
| -Equivalent to: |
14779 |
| -\begin{codeblock} |
14780 |
| -return default_searcher<ForwardIterator, BinaryPredicate>(pat_first, pat_last, pred); |
14781 |
| -\end{codeblock} |
14782 |
| -\end{itemdescr} |
14783 |
| - |
14784 | 14808 | \rSec3[func.search.bm]{Class template \tcode{boyer_moore_searcher}}
|
14785 | 14809 |
|
14786 | 14810 | \indexlibrary{\idxcode{boyer_moore_searcher}}%
|
|
14874 | 14898 | At most \tcode{(last - first) * (pat_last_ - pat_first_)} applications of the predicate.
|
14875 | 14899 | \end{itemdescr}
|
14876 | 14900 |
|
14877 |
| -\rSec4[func.search.bm.creation]{\tcode{boyer_moore_searcher} creation functions} |
14878 |
| - |
14879 |
| -\indexlibrary{\idxcode{make_boyer_moore_searcher}}% |
14880 |
| -\begin{itemdecl} |
14881 |
| -template <class RandomAccessIterator, |
14882 |
| - class Hash = hash<typename iterator_traits<RandomAccessIterator>::value_type>, |
14883 |
| - class BinaryPredicate = equal_to<>> |
14884 |
| - boyer_moore_searcher<RandomAccessIterator, Hash, BinaryPredicate> |
14885 |
| - make_boyer_moore_searcher(RandomAccessIterator pat_first, |
14886 |
| - RandomAccessIterator pat_last, |
14887 |
| - Hash hf = Hash(), |
14888 |
| - BinaryPredicate pred = BinaryPredicate()); |
14889 |
| -\end{itemdecl} |
14890 |
| - |
14891 |
| -\begin{itemdescr} |
14892 |
| -\pnum |
14893 |
| -\effects |
14894 |
| -Equivalent to: |
14895 |
| -\begin{codeblock} |
14896 |
| -return boyer_moore_searcher<RandomAccessIterator, Hash, BinaryPredicate>( |
14897 |
| - pat_first, pat_last, hf, pred); |
14898 |
| -\end{codeblock} |
14899 |
| -\end{itemdescr} |
14900 |
| - |
14901 | 14901 | \rSec3[func.search.bmh]{Class template \tcode{boyer_moore_horspool_searcher}}
|
14902 | 14902 |
|
14903 | 14903 | \indexlibrary{\idxcode{boyer_moore_horspool_searcher}}%
|
|
14991 | 14991 | At most \tcode{(last - first) * (pat_last_ - pat_first_)} applications of the predicate.
|
14992 | 14992 | \end{itemdescr}
|
14993 | 14993 |
|
14994 |
| -\rSec4[func.search.bmh.creation]{\tcode{boyer_moore_horspool_searcher} creation functions} |
14995 |
| - |
14996 |
| -\indexlibrary{\idxcode{make_boyer_moore_horspool_searcher}}% |
14997 |
| -\begin{itemdecl} |
14998 |
| -template <class RandomAccessIterator, |
14999 |
| - class Hash = hash<typename iterator_traits<RandomAccessIterator>::value_type>, |
15000 |
| - class BinaryPredicate = equal_to<>> |
15001 |
| - boyer_moore_horspool_searcher<RandomAccessIterator, Hash, BinaryPredicate> |
15002 |
| - make_boyer_moore_horspool_searcher(RandomAccessIterator pat_first, |
15003 |
| - RandomAccessIterator pat_last, |
15004 |
| - Hash hf = Hash(), |
15005 |
| - BinaryPredicate pred = BinaryPredicate()); |
15006 |
| -\end{itemdecl} |
15007 |
| - |
15008 |
| -\begin{itemdescr} |
15009 |
| -\pnum |
15010 |
| -\effects |
15011 |
| -Equivalent to: |
15012 |
| -\begin{codeblock} |
15013 |
| -return boyer_moore_horspool_searcher<RandomAccessIterator, Hash, BinaryPredicate>( |
15014 |
| - pat_first, pat_last, hf, pred); |
15015 |
| -\end{codeblock} |
15016 |
| -\end{itemdescr} |
15017 |
| - |
15018 | 14994 | \rSec2[unord.hash]{Class template \tcode{hash}}
|
15019 | 14995 |
|
15020 | 14996 | \pnum
|
|
0 commit comments