Skip to content

Commit

Permalink
Update ex11_24_25_26.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Mooophy committed Jul 6, 2015
1 parent 9e660e2 commit 9f71786
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ch11/ex11_24_25_26.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@

int main()
{
//! ex11.26
std::map<int, std::string> m = { { 1,"ss" },{ 2,"sz" } };
using KeyType = std::map<int, std::string>::key_type;
//! ex11.26
std::map<int, std::string> m = { { 1,"ss" },{ 2,"sz" } };
using KeyType = std::map<int, std::string>::key_type;

std::cout << "type to subscript: " << typeid(KeyType).name() << std::endl;
std::cout << "returned from the subscript operator: " << typeid(decltype(m[1])).name() << std::endl;
std::cout << "type to subscript: " << typeid(KeyType).name() << std::endl;
std::cout << "returned from the subscript operator: " << typeid(decltype(m[1])).name() << std::endl;

return 0;
return 0;
}

0 comments on commit 9f71786

Please sign in to comment.