Hacker News new | ask | show | jobs
by jcelerier 1990 days ago
in C++ ? sure

    template<SomeConstraint T>
    void F(T p) { ... }
or just

    void F(SomeConstraint auto p) { ... }

like this for instance: https://gcc.godbolt.org/z/hPM38T
1 comments

cool, can i even add two constraints? or is it limited to one. Oh i see you have include concepts, is that new to c++20 then?