Skip to content

TF2: Fix tier1 not compiling with /std:c++20 on msvc#366

Open
EricZhang456 wants to merge 1 commit intoalliedmodders:tf2from
EricZhang456:tf2-cpp20
Open

TF2: Fix tier1 not compiling with /std:c++20 on msvc#366
EricZhang456 wants to merge 1 commit intoalliedmodders:tf2from
EricZhang456:tf2-cpp20

Conversation

@EricZhang456
Copy link
Copy Markdown

MSVC wouldn't compile public/tier1/UtlSortVector.h with C++20

C:\Users\Eric Zhang\Documents\stuff\hl2sdk\public\tier1\UtlSortVector.h(247): error C3861: 'Base': identifier not found
C:\Users\Eric Zhang\Documents\stuff\hl2sdk\public\tier1\UtlSortVector.h(247): note: 'Base': function declaration must be available as none of the arguments depend on a template parameter
C:\Users\Eric Zhang\Documents\stuff\hl2sdk\public\tier1\UtlSortVector.h(247): error C3861: 'Count': identifier not found
C:\Users\Eric Zhang\Documents\stuff\hl2sdk\public\tier1\UtlSortVector.h(247): note: 'Count': function declaration must be available as none of the arguments depend on a template parameter

Not sure why this is the case, but the fix is simple enough. Might be the same case for other branches as well.

@Kenzzer
Copy link
Copy Markdown
Member

Kenzzer commented Jan 27, 2026

This seems... odd ? I'm not doubting the fix here, but the compiler error seems wrong. I'm going to hold off merging this until I can investigate on my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants