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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:34:59+00:00 2026-06-17T11:34:59+00:00

The following code gives compilation errors on both MSVC++ 2012 CTP (with C+11 support)

  • 0

The following code gives compilation errors on both MSVC++ 2012 CTP (with C+11 support) and Intel C++ XE 13.0:

template <typename F, typename... Args>
    void apply(F f, std::tuple<Args...>& args) {
       // doesn't do much yet
}

bool f1(char c) {
    return c == 'c';
}

int main(int argc, char* argv[]) {
    auto t = std::make_tuple('c');
    apply(f1, t);
return 0;
}

VS2012 error is:

error C2243: 'type cast' : 
conversion from 'std::tuple<char,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil> *'
 to 'std::tuple<std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil> &' exists,
 but is inaccessible

Error on Intel C++ XE 13.0 is:

error : no instance of function template "apply" matches the argument list

What am I missing? Are there really errors here, or do I just have two bad compilers?

UPDATE: Same (or similar) results when I use boost::tuple instead of std::tuple on both compilers.

ADDENDUM: Thanks for all the cross-checks in the comments. I’ve sent bug reports to both of these fine corporations.

  • 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-17T11:35:00+00:00Added an answer on June 17, 2026 at 11:35 am

    That is likely a VC11 bug in the implementation of the Standard Library. Although the CTP supports variadic templates, to the best of my knowledge the Standard Library was not rewritten to use them and adopts some machinery to simulate variadic templates. This is likely at the origin of your problem.

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

Sidebar

Related Questions

The following code gives an compilation error for void b() { m = &A::a;
The following code compiles fine: template<typename T> void f(const T &item) { return; }
Following code gives compiler error which is expected ( Demo ): 1 template<bool> struct
I know that following code gives compilation error : class A{ public : virtual
The following code gives a compilation error: class parent { parent(int a){} } class
The following code gives digits whose name is shorter than their value. I can't
The following code gives seg fault and some time stalls/hangs and never works. for(i=0;i<360;i++)
The following code gives a NullReferenceException since XPathSelectElement can't navigate through the XPath expression
I'm having problems the following code gives me no results. however if I uncomment
when i am analyze my project following code gives me leakage warning. is there

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.