This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
> Ah, I was wondering if this might not be the case. So the fact that std::map works with incomplete types is really an example of undefined behavior, and presumably the code I'm porting is written that way because in VC++'s library implementation that just so happens to be true for hash_map as well. Thank you for your help.
That's right - no diagnostic is required. Presumably hash_map does something internally that needs a complete type, so a diagnostic happens to be given, where map doesn't (unless you turn concept-checks on)
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |