[英]What does the second parameter mean in this signature?
std::vector<int> interpret(const std::string &src, const std::vector<int> &input = {});
除了將引用輸入設置為{}之外,我理解簽名的所有內容。 那是什么意思?
=
引入參數的默認值... {}
在這種情況下表示空vector
。 因此,您可以使用一個參數調用該函數,並且input
將為空。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.