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

  • Home
  • SEARCH
  • 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 6668087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:00:08+00:00 2026-05-26T03:00:08+00:00

I am currently trying to make an old project in C++ work with more

  • 0

I am currently trying to make an old project in C++ work with more recent tools: the project has been developped on Windows XP with VC71 and I am now trying to make it run on Windows 7 with VC100.

I didn’t get any “big” problem yet but however I am having a last compilation issue which led me to some code – pretty obscure to me -.

Here is a sample of the macro (simplified) I am having trouble with:

#define IMPORT_STD_PAIR( _keyClass_ ,_objectClass_)               \
 extern template struct std::pair< _keyClass_,_objectClass_ >;    \
 ...

The error is:

C2955: 'std::allocator' : use of class template requires template argument list.

I don’t really get what it is supposed to do (the 2nd line), specify default parameters to a templated class ?

Thank you for your help.

Edit:
@Mark B: Thank you for you answer. You made me realize what was going on: Nothing.

In fact, it is my fault cause I am not familiar at all with developping on Windows. The code was originally:

#define IMPORT_STD_MAP( _import_directive_, _keyClass_ ,_objectClass_) \
  extern template struct _import_directive_ std::pair<_keyClass_,_objectClass_>;    

I neglected _import_directive_ cause it was almost “empty” in every case but one. So when it is empty, it simply creates an instance with no name which is not really relevant; but when this macro takes the value __declspec ( dllimport ) it makes much more sense 🙂

Thanks for helping me realizing that, I thought it was something more exotic, and thank you for the debugging advice which has been useful.

  • 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-05-26T03:00:08+00:00Added an answer on May 26, 2026 at 3:00 am

    It looks like it’s attempting to instantiate a specific instantiation of std::pair. Without more context I can’t see why this would be attempted, but you might try just making the macro define to nothing and see if the code compiles, links, and appears to work. They may have changed template compiling in 10.0.

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

Sidebar

Related Questions

I'm currently trying to make a small application that performs different duties. Right now
Erlang version: R13B01 Currently I'm struggling trying to make Erlang work with SSL. The
I am currently trying to make a navigation-menu where an active-class is applied to
I am currently trying to make a sectioned table like this: Section 1: Entry
I'm currently trying to find good way to make calls to WCF services in
I'm currently trying to create a subclass of UIImageView in order to make it
I'm currently trying to read in an XML file, make some minor changes (alter
i'm trying to make the following routes .. and currently i'm going about this
I'm trying to make a Tetris-like game in XNA, and currently I'm thinking of
I am currently looking at replacements for the old make system for some projects.

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.