alliedmodders / hl2sdk

Half-Life 2 SDK Mirrors
https://github.com/valvesoftware
341 stars 158 forks source link

Enable `tier0/threadtools.h` to compile under GCC with `-std=c++20` #242

Closed drunderscore closed 1 month ago

drunderscore commented 1 month ago

GCC won't compile this with -std=c++20:

template<class TBar>
class Foo
{
    // Note: Template parameter re-declaration in the copy constructor
    Foo<TBar>(const Foo<TBar>&);
};

...which is the syntax seen in tier0/threadtools.h. Although the AMBuild doesn't use C++20, I do -- and this change is rather simple, and correct anyhow.