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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:18:15+00:00 2026-05-30T12:18:15+00:00

I found the following syntax in a c++ source file (not header): template <typename

  • 0

I found the following syntax in a c++ source file (not header):

template <typename Type_> static void aFunction(Type_ &function, ...) {
    uintptr_t value(astruct.val); //confusing
}

Is that confusing line in question a declaration for value? I tried writing a hello world program like:

int main(){ uintptr_t a(80); return 0;}

and it returns an expected declaration specifiers or ‘…’ before numeric constant, may i know what does that confusing line do? Thanks!

Edit: I think i should reveal the full function declaration:

    template <typename Type_>
static void nlset(Type_ &function, struct nlist *nl, size_t index) {
    struct nlist &name(nl[index]);
    uintptr_t value(name.n_value);// this is the confusing line
    if ((name.n_desc & N_ARM_THUMB_DEF) != 0)
        value |= 0x00000001;
    function = reinterpret_cast<Type_>(value);
}
  • 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-30T12:18:16+00:00Added an answer on May 30, 2026 at 12:18 pm

    uintptr_t is an unsigned integer (at least) the size of a pointer.

    It is not a native type though and you need to include <stdint.h> or <cstdint>

    Really it is “evil” to cast pointers to ints and store them as integral variables but there is a lot of “legacy” code that does it and relies on it, and so you need an int size big enough to store it.

    Storing them as integers allows you to do things you can do with ints “safely” but not with pointers, such as compare them when they are not part of the same range, in order to use them in memory-leak checkers, etc.

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

Sidebar

Related Questions

I've found the following syntax in a python file: units = ( (100, 1
I was googling and found the following syntax for pointers void main() { char
I found the following syntax as a VB.NET property and I'm trying to convert
On the MSDN, I have found following: public event EventHandler<MyEventArgs> SampleEvent; public void DemoEvent(string
I found the following code somewhere, but I am not understanding the code properly.
I found the following code in my team's project: Public Shared Function isRemoteDisconnectMessage(ByRef m
I'm debugging some code for a client and found the following syntax: switch ($i)
Using PHPMyAdmin, I am trying to import a file via the following syntax... LOAD
I found here the following syntax: <%=h @person.first_name %> What does the h means
I've got following class and template function: template <size_t num> class String{ public: char

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.