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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:15:08+00:00 2026-05-11T14:15:08+00:00

The error I’m getting: error C2664: ‘v8::FunctionTemplate::New’ : cannot convert parameter 1 from ‘v8::Handle<T>

  • 0

The error I’m getting:

error C2664: 'v8::FunctionTemplate::New' : cannot convert parameter 1 from 'v8::Handle<T> (__cdecl *)(const v8::Arguments &)' to 'v8::InvocationCallback' 

Relevant definitions:

typedef Handle<Value> (*InvocationCallback)(const Arguments& args);     template<class C> class V8ScriptClass { public:     template<class C, typename Rtype, typename Ptype1, Rtype (C::*FuncPtr)(Ptype1)>      void RegisterFunc(const char* const scriptname)     {         objtemplate->Set(             v8::String::New(scriptname),              v8::FunctionTemplate::New(             V8ScriptClass<C>::RelayCallback<C, Rtype, Ptype1, FuncPtr>                 ));     };  template<typename Rtype, typename Ptype1, Rtype (*FuncPtr)(Ptype1 param1)> static v8::Handle<v8::Value> RelayCallback(const v8::Arguments& args) {     std::cerr<<__FUNCTION__<<std::endl;     v8::HandleScope handle_scope;     return handle_scope.Close(toJSType( ((FuncPtr)(toCType(args[0]))) )); }; 

Looks to me like the typedef and the actual function signature are identical.

edit: forgot one declaration:

class EXPORT FunctionTemplate : public Template {  public:   /** Creates a function template.*/   static Local<FunctionTemplate> New(       InvocationCallback callback = 0,       Handle<Value> data = Handle<Value>(),       Handle<Signature> signature = Handle<Signature>()); 
  • 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. 2026-05-11T14:15:09+00:00Added an answer on May 11, 2026 at 2:15 pm

    I found the error. the RelayCallback template takes a static function pointer as argument, and I tried to instantiate it with a member function pointer. I just had to change it to a member function pointer template argument.

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

Sidebar

Ask A Question

Stats

  • Questions 122k
  • Answers 122k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You should disable the Z-buffer when drawing the text with… May 12, 2026 at 12:42 am
  • Editorial Team
    Editorial Team added an answer junit4: @Test(expected = org.dom4j.DocumentException.class) void shouldThrowException() { getFile(null); } junit3:… May 12, 2026 at 12:42 am
  • Editorial Team
    Editorial Team added an answer At long last, the official MS marketing site for VSTS… May 12, 2026 at 12:42 am

Related Questions

The error I'm getting: in /Users/robert/Documents/funWithFrameworks/build/Debug-iphonesimulator/funWithFrameworks.framework/funWithFrameworks, can't link with a main executable Cliff notes:
The error I'm getting: error C2664: 'v8::FunctionTemplate::New' : cannot convert parameter 1 from 'v8::Handle<T>
I'm getting the error Invalid argument supplied for foreach() even though the array being
I have the below error message in my asp.net website when i replaced the
I have the below error message in my asp.net website when i replaced the

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.