Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As part of resolving <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1399" rel="nofollow">http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1399</a>, it was decided that a parameter pack that is non-deducible will not participate in deduction, hence keeping the explicitly specified arguments within the parameter list, but not disturbing the matching of subsequent arguments to subsequent function parameters. However those added rules do not necessarily apply for deduction when comparing types (which is a sub-algorithm of the deduction of the set of parameters against the arguments for a function call).</p> <p>I would argue that the resolution should apply to your situation aswell and regard it as simply an area where the specification is not entirely clear. You may want to send a bug report to the respective compilers and they may want to send an issue report to WG21 for asking to clarify this (although I am not sure I would go as far as saying that this is a normative spec issue - the Standard says elsewhere that non-deducible contexts do not participate in deductions). </p> <p>Note as <code>A1</code> is a parameter of the enclosing class template (and hence become normal parameters when the class is instantiated), you can omit them and keep the same meaning as far as template argment deduction is concerned</p> <pre><code>class Test { public: template &lt;class... A2&gt; void print (A2..., float, double) { } }; int main () { Test test; test.print&lt;int&gt; (1, 1.0f, 1.0); // works } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload