Anything like the c# params in c++?

后端 未结 4 1259
后悔当初
后悔当初 2021-02-18 19:26

That is the question.

4条回答
  •  清酒与你
    2021-02-18 20:06

    There is a named parameters library in boost (if I understood correctly what params in C# are). It allows writing functions like this:

    int y = lib::f(_name = "bob", _index = 2);
    

    Can't tell anything about if there is a significant overhead involved.

提交回复
热议问题