Ilgari bergan javobim tufayli paydo bo'lgan chalkashlik uchun uzr so'rayman. Avtomatik shablon deduksiyasi birinchi misolda ishlaydi, chunki tur aniq ko'rsatilgan - `key1` turi `std::string ` deb e'lon qilingan. Ikkinchi misolda muvaffaqiyatsizlikka uchraydi, chunki kompilyator tomonidan string literal `"apple"` turi `const char*` deb qabul qilinadi, bu esa `map2` turi bilan ziddir (`std::string `). Xato shkafning argumentlarini aniq ko'rsatish orqali tuzatish mumkin: `` int key2 = getkey<int, std::string>(map2, "apple"); ``` Yoki stdmap::string literal sufiksidan foydalanish: ` using std ` namespace::
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence