+*Dependent names*, names that depend on a template parameter, have lookup behavior that is also different under **/Zc:twoPhase-**. In conformance mode, dependent names are not bound at the point of the template’s definition. Instead, these names are looked up when the template is instantiated. For function calls with a dependent function name, the name is bound to the set of functions that are visible at the point of the call in the template’s definition, as above. Additional overloads from argument-dependent lookup are added at both the point of the template definition and the point of where the template is instantiated. The two phases of two-phase lookup are the lookup for non-dependent names at the time of template definition, and lookup for dependent names at the time of template instantiation. Under **/Zc:twoPhase-**, the compiler does not do argument-dependent lookup separately from ordinary, unqualified lookup (that is, it doesn't do two-phase lookup), so the results of overload resolution may be different.
0 commit comments