File tree Expand file tree Collapse file tree 1 file changed +30
-2
lines changed Expand file tree Collapse file tree 1 file changed +30
-2
lines changed Original file line number Diff line number Diff line change 630
630
631
631
\pnum
632
632
A defaulted move special function\iref {class.copy } that is
633
- defined as deleted is excluded from the set of candidate functions in all
634
- contexts.
633
+ defined as deleted is excluded from the set of candidate functions
634
+ in all contexts.
635
+ A constructor inherited from class type \tcode {C}\iref {class.inhctor.init }
636
+ that has a first parameter of type `` reference to \cvqual {cv1} \tcode {P}''
637
+ (including such a constructor instantiated from a template)
638
+ is excluded from the set of candidate functions
639
+ when constructing an object of type \cvqual {cv2} \tcode {D}
640
+ if the argument list has exactly one argument and
641
+ \tcode {C} is reference-related to \tcode {P} and
642
+ \tcode {P} is reference-related to \tcode {D}.
643
+ \begin {example }
644
+ \begin {codeblock }
645
+ struct A {
646
+ A();
647
+ A(A &&); // \# 1
648
+ template<typename T> A(T &&); // \# 2
649
+ };
650
+ struct B : A {
651
+ using A::A;
652
+ B(const B &); // \# 3
653
+ B(B &&) = default; // \# 4, implicitly deleted
654
+
655
+ struct X { X(X &&) = delete; } x;
656
+ };
657
+ extern B b1;
658
+ B b2 = static_cast<B&&>(b1); // calls \# 3: \# 1, \# 2, and \# 4 are not viable
659
+ struct C { operator B&&(); };
660
+ B b3 = C(); // calls \# 3
661
+ \end {codeblock }
662
+ \end {example }
635
663
636
664
\rSec 3[over.match.call]{Function call syntax}%
637
665
\indextext {overloading!resolution!function call syntax|(}
You can’t perform that action at this time.
0 commit comments