我正在處理自定義庫。到目前爲止,我已經將std :: tuple和std :: tie包裝到我自己的myOwn :: Tuple和myOwn :: tie中。它們的功能與std :: tuple和std :: tie相同。我想用std :: ignore做類似的事情。包裝std :: ignore
到目前爲止,我已經寫了以下內容:
namespace myOwn
{
auto
tilde()
-> decltype(std::ignore)
{
return std::ignore;
}
}
我唯一的問題是,我現在必須使用myOwn ::波浪號()用括號。我希望能夠使用這個myOwn :: tilde。到目前爲止,我已經在讀的std ::忽視的是如何使用它,
這裏:Possible implementations of std::ignore
這裏:Requirements for std::ignore
在這裏:C++: Return type of std::tie with std::ignore
我已經嘗試使用
但這沒有成功。任何幫助,將不勝感激。這個問題可能對試圖包裝對象的其他人有用。
你認爲'std :: ignore'是什麼?一個*類型*或一個*對象*? – Nawaz
你爲什麼包裝std的東西!? –
有'自動tilde = std :: ignore;'有問題嗎? –