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 830699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:05:13+00:00 2026-05-15T04:05:13+00:00

I have ran into yet another problem I do not understand. The following does

  • 0

I have ran into yet another problem I do not understand.

The following does not instantiate (argument instantiation fails), why?

template<class E>
void operator[](typename boost::mpl::identity<E>::type e) const;

thank you for your help

  • 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-15T04:05:13+00:00Added an answer on May 15, 2026 at 4:05 am

    identity can be used to force you to specify the template argument explicitly. It effectively prevents that function parameter from partaking in template argument deduction.

    A qualified type name is one of the non deduced contexts; that is, identity<E>::type will not be used to deduce the template parameter for E.

    For example, if you have:

    template<class E>
    void f(typename boost::mpl::identity<E>::type e) { }
    
    f(42);      // won't work
    f<int>(42); // works
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm running a stored procedure and have ran into a problem with the following
Currently developing a PHP framework and have ran into my first problem. I need
I have ran into a problem that i suspect has to do painting/drawing elements
So here is another z-index issue in IE7 I have ran into. I found
I have ran into an interesting issue while trying to create a more usable
I'm currently getting to grips with mod_rewrite and have ran into a stumbling block
I'm building a module installer for my CMS and i have ran into a
I am learning JQuery, and I have ran into an odd issue. I made
I am fairly new to C++, but i have ran into an issue which
I am coding a text based Java game, I have ran into a few

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.