A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://timsong-cpp.github.io/cppwp/n4659/over.match.class.deduct below:

[over.match.class.deduct]

A set of functions and function templates is formed comprising:

Initialization and overload resolution are performed as described in [dcl.init] and [over.match.ctor], [over.match.copy], or [over.match.list] (as appropriate for the type of initialization performed) for an object of a hypothetical class type, where the selected functions and function templates are considered to be the constructors of that class type for the purpose of forming an overload set, and the initializer is provided by the context in which class template argument deduction was performed. Each such notional constructor is considered to be explicit if the function or function template was generated from a constructor or deduction-guide that was declared explicit. All such notional constructors are considered to be public members of the hypothetical class type.

[Example:

template <class T> struct A {
  explicit A(const T&, ...) noexcept;    A(T&&, ...);                         };

int i;
A a1 = { i, i };                        
A a2{i, i};         A a3{0, i};         A a4 = {0, i};      
template <class T> A(const T&, const T&) -> A<T&>;  template <class T> explicit A(T&&, T&&) -> A<T>;    
A a5 = {0, 1};      A a6{0,1};          A a7 = {0, i};      A a8{0,i};          
template <class T> struct B {
  template <class U> using TA = T;
  template <class U> B(U, TA<U>);
};

B b{(int*)0, (char*)0};         

end example]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4