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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:58:27+00:00 2026-05-15T15:58:27+00:00

I believe I had seen macro in boost that recovers template template parameters, for

  • 0

I believe I had seen macro in boost that recovers template template parameters, for example:

template<class>
struct parameters;

#define parameters(T) template<class A> \
          struct parameters<T<A> > { typedef A type1; };

is there one like this, or am I wrong?

Thank you

  • 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-15T15:58:28+00:00Added an answer on May 15, 2026 at 3:58 pm

    delctype support in C++0x makes this fairly trivial to implement:

    template<template <typename> class Parent, typename Param1>
    Param1 get_type(Parent<Param1> const &input) { return Param1(); }
    
    SomeTpl<int> some_obj;
    delctype(get_type(some_obj)) x;
    

    (Though you need a separate get_type definition for templates with 2, 3, 4, etc parameters.)

    Unfortunately, I don’t think there is a way to do this without decltype, because to do so required automatic the type-deduction provided by function templates (which is not available for class templates) and so there’s no way to make a typedef that way.

    I don’t know off-hand if boost has anything like this already, but if they do it will still require your compiler to support decltype, but since decltype is so new there is not a lot of stuff in boost that uses it yet (though there is some).

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

Sidebar

Related Questions

I believe conversion exactly to BigInteger[] would be optimal in my case. Anyone had
I believe that the rallytagpicker is definitely a useful component. However, I do not
I believe my problem stems from my use of weights and the RelativeLayout that
I gotta admit that's a first-timer bug for me. I've never seen that... I
Here's something I think should work (and I believe I once had it working)
I had problems covering videos on Youtube itself but solved that with a design
I am getting some strange behavior involving database queries that I have never seen
I had the following JSF backing bean in my Webapp @ManagedBean class MyBackingBean implements
I edited the code below as I believe I had been combining the IterV
I have seen and experienced problems with app.config/web.config where I had changed the order

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.