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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T13:28:01+00:00 2026-06-16T13:28:01+00:00

when i run the code below i get the following error (boost version 1.46.1-7ubuntu3

  • 0

when i run the code below i get the following error (boost version 1.46.1-7ubuntu3 running on kubuntu 12.04):

test_param_bug.cpp:34:1: error: wrong number of template arguments (6, should be 5)
/usr/include/boost/parameter/parameters.hpp:714:8: error: provided for ‘template<class PS0, class PS1, class PS2, class PS3, class PS4> struct boost::parameter::parameters’
In file included from test_param_bug.cpp:2:0:
/usr/include/boost/parameter/preprocessor.hpp: In instantiation of ‘boost::parameter::aux::argument_pack<boost_param_params_34func<int> >’:
test_param_bug.cpp:34:1:   instantiated from here
/usr/include/boost/parameter/preprocessor.hpp:157:13: error: no type named ‘parameter_spec0’ in ‘struct boost_param_params_34func<int>’
/usr/include/boost/parameter/preprocessor.hpp:158:47: error: no type named ‘parameter_spec0’ in ‘struct boost_param_params_34func<int>’
test_param_bug.cpp:34:1: error: template argument 1 is invalid
test_param_bug.cpp:34:1: error: expected initializer before ‘func’
test_param_bug.cpp:34:1: error: wrong number of template arguments (7, should be 6)
/usr/include/boost/parameter/preprocessor.hpp:148:8: error: provided for ‘template<class Parameters, class A0, class A1, class A2, class A3, class A4> struct boost::parameter::aux::argument_pack’
test_param_bug.cpp:34:1: error: template argument 1 is invalid
test_param_bug.cpp:34:1: error: wrong number of template arguments (7, should be 6)
/usr/include/boost/parameter/preprocessor.hpp:98:8: error: provided for ‘template<class Parameters, class A0, class A1, class A2, class A3, class A4> struct boost::parameter::aux::match’
test_param_bug.cpp: In function ‘int main()’:
test_param_bug.cpp:41:10: error: no matching function for call to ‘func()’
test_param_bug.cpp:41:10: note: candidates are:
 ...CUT....

it works fine with at most five parameters though. it’d be nice to make this run cause i think it’s a handy feature. is this a well known limitation or am i not using it correctly?

BOOST_PARAMETER_FUNCTION(
  (void),
  func,
  tag, 
  (optional
   (param1, (int), 0)
   (param2, (int), 0)
   (param3, (int), 0)
   (param4, (int), 0)
   (param5, (int), 0)
   (param6, (int), 0) //<- won't work. too many arguments?
   )
  )
{
}
  • 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-06-16T13:28:02+00:00Added an answer on June 16, 2026 at 1:28 pm

    The max number of arguments in a function in Boost.Parameter can be configured using #define BOOST_PARAMETER_MAX_ARITY n(n=6 in your case) before the inclusion of headers. This parameter had a default value of 5 before boost 1.49. The value is 8 after that. I believe increasing this number affects the compile time of your program so you should set it to what you need and not arbitrarily high.

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

Sidebar

Related Questions

When I run the code below I get the following error. C:\Documents and Settings\BOS\Desktop\test>java
When I run the code below for the GetWindowText I get the following error
When I run the following code, I get the exception below: ''# NOTE: ExcelApp
I get this error when I run the code below. I have normally used
When I run the code below when $entry = miami.com, I get the following
When i run the below code I am getting error like ex = {The
I get the following error when I tried to run a 'Published' local website.
Every time I run the code below it is supposed to come up with
When I run the code below NSString *chemin; chemin = [NSString stringWithFormat:@chapitre0%d, [sender tag]];
I am trying to run the code below but it keeps locking up my

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.