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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:28:22+00:00 2026-05-27T07:28:22+00:00

There is class definition like this: template <class Impl> FullO3CPU<Impl>::FullO3CPU(DerivO3CPUParams *params) class DerivO3CPU :

  • 0

There is class definition like this:

template <class Impl>
FullO3CPU<Impl>::FullO3CPU(DerivO3CPUParams *params)
class DerivO3CPU : public FullO3CPU<O3CPUImpl>
{
   public:
     DerivO3CPU(DerivO3CPUParams *p)
       : FullO3CPU<O3CPUImpl>(p)
     { }
};

DerivO3CPU * 
DerivO3CPUParams::create()
{
  ...
  return new DerivO3CPU(this);
}

What I changed was adding another argument to FullO3CPU

template <class Impl>
FullO3CPU<Impl>::FullO3CPU(DerivO3CPUParams *params, My_param *mp)

class DerivO3CPU : public FullO3CPU<O3CPUImpl>
{
   public:
     DerivO3CPU(DerivO3CPUParams *p, My_param *mp)
       : FullO3CPU<O3CPUImpl>(p, mp)
     { }
};

DerivO3CPU *
DerivO3CPUParams::create() 
{
  ...
  return new DerivO3CPU(this);
}

However I don’t know what to do with

return new DerivO3CPU(this); 

because I get this error:

error: no matching function for call to 'DerivO3CPU::DerivO3CPU(DerivO3CPUParams* const)'
note: candidates are:
note: DerivO3CPU::DerivO3CPU(DerivO3CPUParams*, My_param*)
note:   candidate expects 2 arguments, 1 provided
  • 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-27T07:28:23+00:00Added an answer on May 27, 2026 at 7:28 am

    Well, you need to add it to create, too, or use one stored somewhere.

    DerivO3CPU *
    DerivO3CPUParams::create(My_param *p) 
    {
      ...
      return new DerivO3CPU(this, p);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've a situation where there is a class definition that looks like this: template<class
Is there a way to dynamically and conditionally create a class definition in PHP,
I have DefineEvent class template that I use to ease the definition of new
I have a defined a simple template class. In this class I define a
This compiled on VS 2008, but it seems like non-standard usage of templates. template
Let's say that you have a Model that looks kind of like this: public
Basically I have code which looks like this inside a header file: class Bar;
I would like to be able to achieve something like this: class Zot {
In C++, I'm trying to create a specialized point class as a union, like
If I have a template class specification like so, template <typename T> class MyClass

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.