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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:03:12+00:00 2026-05-15T10:03:12+00:00

I am trying to do something along the lines of this answer , and

  • 0

I am trying to do something along the lines of this answer, and struggling:


$ gcc --version
gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu4)

file.cpp:7: error: template argument 1 is invalid  
file.cpp:7: error: typedef name may not be a nested-name-specifier

And the offending part of the file:

template <class R, class C, class T0=void, class T1=void, class T2=void>
struct MemberWrap;

template <class R, class C, class T0>
struct MemberWrap<R, C, T0>{
    typedef R (C::*member_t)(T0);
    typedef typename boost::add_reference<typename T0>::type> TC0; // <---- offending line

    MemberWrap(member_t f)
        : m_wrapped(f){
    }

    R operator()(C* p, TC0 p0){
        GILRelease guard;
        return (p->*(this->m_wrapped))(p0);
    }

    member_t m_wrapped;
};
  • 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-15T10:03:13+00:00Added an answer on May 15, 2026 at 10:03 am

    Drop typename from typename T0 in

    typedef typename boost::add_reference<typename T0>::type> TC0;
    

    and probably drop the second angle bracket as well. I.e.

    typedef typename boost::add_reference<T0>::type TC0;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to do something along the lines of this using GCC 4.7 snapshot:
I am trying to accomplish something along the lines of this: http://devblog.jasonhuck.com/assets/infiniteformrows.html But... I
I'm trying to use something along the lines of unexpand -t 4 *.php but
I'm trying something along these lines. //Somewhere in my app System.Uri resourceLocater = new
I'm trying to do something along these lines: private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
All I am currently trying implement something along the lines of dim l_stuff as
I'm trying to do something along the lines of: A.CallTo(() => fakeTimer.Start()).Invokes(() => fakeTimer.Elapsed
I'm trying something along these lines: private static class TexturePanel extends JPanel { @Override
Hello I'm trying something .. I was reading Jquery traversing documentations some forums, this
I'm trying something like this, but this example does not work. jsObj = {};

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.