Why is the compiler not recognizing count function

Can anyone help me why the compiler is not recognizing the .count function of the inbuilt hashmap

#include <unordered_map>
#include <iterator>
#include <string>

unordered_map<char,bool> iniMap;
string uniqueChar(string str) {
	// Write your code here
    
    string output;
    for(int i=0;i<str.size();i++)
    {
        if(iniMap.count(str[i])>0)
        {
            continue;
        }
        iniMap[str[i]]=true;
        output.insert(output.size()-1,str[i]);
    }
    return str;
}

Compilation Failed
In file included from runner.cpp:5:0:
solution.h: In function ‘std::__cxx11::string uniqueChar(std::__cxx11::string)’:
solution.h:17:45: error: no matching function for call to ‘std::__cxx11::basic_string::insert(std::__cxx11::basic_string::size_type, __gnu_cxx::__alloc_traits >::value_type&)’
output.insert(output.size()-1,str[i]);
^
In file included from /usr/include/c++/5/string:52:0,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from runner.cpp:1:
/usr/include/c++/5/bits/basic_string.h:1229:7: note: candidate: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, _CharT) [with _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator = __gnu_cxx::__normal_iterator >; typename __gnu_cxx::__alloc_traits::rebind<_CharT>::other>::pointer = char*; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator >; typename __gnu_cxx::__alloc_traits::rebind<_CharT>::other>::const_pointer = const char*; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]
insert(const_iterator __p, size_type __n, _CharT __c)
^

type or paste code here