Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8120821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:16:39+00:00 2026-06-06T05:16:39+00:00

I have a project working fine under MSVS 2010 SP1. I’m trying to convert

  • 0

I have a project working fine under MSVS 2010 SP1.
I’m trying to convert it to MSVS 2012 RC. I had to change some stuff, mainly related to C++ header/lib paths and MFC custom stuff. But I have one last hurdle to clear.

In MSVC 2010, I’m using a lot of unordered_map<basic_string<TCHAR>, int> or map<basic_string<TCHAR>, int>. It compiles fine. But in MSVS 2012, I just get this error:
“The C++ standard doesn’t provide a hash for this type”

After searching a bit on the net, I found out that MSVS 2012 should be more close to the C++11 standard, and that the standard only defines hash functions for basic types and 4 defined string types (among them string and wstring, but basic_string not included).
So I changed all basic_string<TCHAR> to wstring but to no avail… I still get the same error.

What should I do to be able to compile my app again?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T05:16:41+00:00Added an answer on June 6, 2026 at 5:16 am

    Apparently OOEngineer used basic_string without including the <string> header. Part of the functionality might be visible anyway, through indirect includes by other headers.

    When VS2010 was released, the then proposed standard put all std::hash<> specializations in the <functional> header. In the final C++11 standard it was decided that it was better to put these together with the respective container, so some hash<> specializations were moved to <string>, <vector>, etc.

    So, to used all (or any, really) functionality of std::string, you have to include the <string> header yourself and not rely on another system header doing so.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project that was working fine. For some reason it stopped showing
I have created a wix installer project which is working fine. It installs my
I have web application Project having RPC call. one RPC async is working fine.
I have used push notification for my project & was working fine with HTTP
I have a working project that Im amending, it crashes after trying to use
I have a web project working perfecly on my web server and on my
I have a project I am working on where I am dealing with PARTS
I have a project I'm working on and I'm using the Telerik MVC controls.
I have a project which I am working on and it has multiple files
I have a project which I am working on and it has multiple files

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.