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

  • Home
  • SEARCH
  • 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 6904115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:00:43+00:00 2026-05-27T08:00:43+00:00

Using BOOST, I am trying to get the calling convention of a function, and

  • 0

Using BOOST, I am trying to get the calling convention of a function, and to do this I am taking a similar approach as the individual who posted the same question – however their solution has not solved my problem.

Heres a link to their problem: function calling convention with boost::function_types

I have attempted to get the calling convention using a similar approach but am getting compiler errors complaining that “cdecl_cc” is not defined. Heres a small snippet of my code:

#define BOOST_FT_COMMON_X86_CCs 1
#include <boost/function_types/config/config.hpp>
#include <boost/function_types/is_function.hpp>

    static bool isCdecl()
    {
        if(boost::function_types::is_function<T, cdecl_cc>::value == true)
            return true;

                return false;
    }

The other user claims that by adding an include to boost/function_types/config/config.hpp and by defining BOOST_FT_COMMON_X86_CCs, there problem was solved – however It has not solved mine.

I’ve tried placing the includes and the definition inside of a precompiled header as well.

Looking at config.hpp I see an include to cc_names.hpp which lists the definition like so

#define BOOST_FT_BUILTIN_CC_NAMES \
  (( IMPLICIT           , implicit_cc , BOOST_PP_EMPTY                ))\
  (( CDECL              , cdecl_cc    , BOOST_PP_IDENTITY(__cdecl   ) ))\
  (( STDCALL            , stdcall_cc  , BOOST_PP_IDENTITY(__stdcall ) ))\
  (( PASCAL             , pascal_cc   , BOOST_PP_IDENTITY(pascal    ) ))\
  (( FASTCALL           , fastcall_cc , BOOST_PP_IDENTITY(__fastcall) ))\
  (( CLRCALL            , clrcall_cc  , BOOST_PP_IDENTITY(__clrcall ) ))\
  (( THISCALL           , thiscall_cc , BOOST_PP_IDENTITY(__thiscall) ))\
  (( IMPLICIT_THISCALL  , thiscall_cc , BOOST_PP_EMPTY                )) 

I am not sure how one should interpret a definition like this, if someone could explain it to me I might be able to figure out how to solve my problem.

Sorry for all the BOOST related questions from me, I am fairly new to it and I am diving head first into one of the more difficult libraries.

Thanks.

  • 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-27T08:00:44+00:00Added an answer on May 27, 2026 at 8:00 am

    I believe you need to qualify cdecl_cc with the boost::function_types namespace, and also #include <boost/function_types/property_tags.hpp>.

    Boost is great, but the documentation can at times be obscure. I think they tend to write it as if it was part of the standard, so the namespace is implicit. But unless otherwise specified you should assume everything is in some namespace, either boost or a more specific one.

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

Sidebar

Related Questions

While trying to get comfortable with boost , stumbled into problem with using boost::function
I'm trying to get all words inside a string using Boost::regex in C++. Here's
I'm trying setup a subset of boost and get it properly compiled using bjam,
Hello i been trying to get a tokenizer to work using the boost library
I'm trying to expose the following c++ function to python using boost.python: template <typename
I'm trying to do something like this: using namespace boost::lambda; using boost::thread; int add(int
I'm trying to create something similar as this code found at the boost.asio examples.
I'm trying to get a handle on using boost::spirit to parse character tokens, and
I am trying to pass a function pointer using boost::bind. void Class::ThreadFunction(Type(*callbackFunc)(message_type::ptr&)) { }
I am trying to build a project using Boost's Asio and I am having

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.