| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -310,7 +310,7 @@ const char (&z)[2] = argc > 3 ? "A" : "B"; // const char* without /Zc:ternary | |||
| 310 | 310 | ||
| 311 | 311 | #### Name dependency analysis | |
| 312 | 312 | ||
| 313 | - When the **/permissive-** option is set in Visual Studio 2017 Update 3, the compiler parses function and class template definitions, identifying dependent and non-dependent names used in templates as required for two-phase look-up. In this release, only name dependency analysis is performed. In particular, non-dependent names that are not declared in the context of a template definition cause a diagnostic message as required by the ISO C++ standards. However, binding of non-dependent names that require argument dependent look up in the definition context is not done. | ||
| 313 | + When the **/permissive-** option is set in Visual Studio 2017 Update 3, the compiler parses function and class template definitions, identifying dependent and non-dependent names used in templates as required for two-phase name look-up. In this release, only name dependency analysis is performed. In particular, non-dependent names that are not declared in the context of a template definition cause a diagnostic message as required by the ISO C++ standards. However, binding of non-dependent names that require argument dependent look up in the definition context is not done. | ||
| 314 | 314 | ||
| 315 | 315 | ```cpp | |
| 316 | 316 | // dependency.cpp | |
@@ -319,15 +319,15 @@ When the **/permissive-** option is set in Visual Studio 2017 Update 3, the comp | |||
| 319 | 319 | #include <stdio.h> | |
| 320 | 320 | ||
| 321 | 321 | void f(long) { | |
| 322 | - puts("Standard two-phase!"); | ||
| 322 | + puts("Standard two-phase name dependency"); | ||
| 323 | 323 | } | |
| 324 | 324 | ||
| 325 | 325 | template <typename T> void g(T t) { | |
| 326 | 326 | f(t); | |
| 327 | 327 | } | |
| 328 | 328 | ||
| 329 | 329 | void f(int) { | |
| 330 | - puts("Microsoft one-phase!"); | ||
| 330 | + puts("Microsoft one-phase name dependency"); | ||
| 331 | 331 | } | |
| 332 | 332 | ||
| 333 | 333 | int main() { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments