Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #86838
| From | Andrey Tarasevich <andreytarasevich@hotmail.com> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: Is this valid C++ code? |
| Date | 2022-10-08 11:18 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <thseta$83se$1@dont-email.me> (permalink) |
| References | <bc46c146-abb5-4b16-b62d-324e049c7083n@googlegroups.com> <thpvdl$3qfkl$2@dont-email.me> |
On 10/7/2022 12:41 PM, Andrey Tarasevich wrote: > > This is an opportunity GCC immediately took advantage of. GCC > instantiates templates at the very end of the TU and, expectedly, > interprets their content from that vantage point. Which is why GCC > reports errors neither in your example nor in mine. Meanwhile, Clang and > MSVC still stick to the "early instantiation" approach, which allows > them to see the problems in our examples. > Oh, I see that it was actually Clang that accepted the code... Frankly, I'm having hard time trying to find a single version of Clang that would accept it. GCC complains too, since partial specialization after instantiation is a different kind of error. And a well-diagnosable one. Which version of Clang were you using? -- Best regards, Andrey
Back to comp.lang.c++ | Previous | Next — Previous in thread | Find similar | Unroll thread
Is this valid C++ code? "daniel...@gmail.com" <danielaparker@gmail.com> - 2022-10-03 14:09 -0700
Re: Is this valid C++ code? David LaRue <huey.dll@tampabay.rr.com> - 2022-10-03 23:52 +0000
Re: Is this valid C++ code? "daniel...@gmail.com" <danielaparker@gmail.com> - 2022-10-03 18:07 -0700
Re: Is this valid C++ code? "daniel...@gmail.com" <danielaparker@gmail.com> - 2022-10-03 18:42 -0700
Re: Is this valid C++ code? Juha Nieminen <nospam@thanks.invalid> - 2022-10-04 06:05 +0000
Re: Is this valid C++ code? Bo Persson <bo@bo-persson.se> - 2022-10-04 13:47 +0200
Re: Is this valid C++ code? "daniel...@gmail.com" <danielaparker@gmail.com> - 2022-10-04 05:22 -0700
Re: Is this valid C++ code? Manfred <noname@add.invalid> - 2022-10-05 02:54 +0200
Re: Is this valid C++ code? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2022-10-07 12:41 -0700
Re: Is this valid C++ code? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2022-10-08 11:18 -0700
csiph-web