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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:03:54+00:00 2026-06-13T01:03:54+00:00

How can I compare function pointers in C++? Is it stable? For example, would

  • 0

How can I compare function pointers in C++? Is it stable?

For example, would something like this be valid:

if(pFnc == &myFnc){
//Do something
}
  • 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-13T01:03:55+00:00Added an answer on June 13, 2026 at 1:03 am

    C++03 5.10/1 [expr.eq]:

    The == (equal to) and the != (not equal to) operators have the same
    semantic restrictions, conversions, and result type as the relational
    operators except for their lower precedence and truth-value result.
    [Note: a < b
    == c < d is true whenever a < b and c < d have the same truth-value. ] Pointers to objects or functions of the same type (after pointer conversions) can be compared for equality. Two pointers of the same
    type compare equal if and only if they are both null, both point to
    the same function, or both represent the same address (3.9.2).

    Emphasis mine.

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

Sidebar

Related Questions

I would like to know if there is anyway I can compare two columns
I am looking for a gem that can compare two strings (in this case
is there a way l can compare two columns | fields in django like
How can i hash (std::tr1::hash or boost::hash) a c++ pointer-to-member-function? Example: I have several
I'm losing my hairline over something that's probably minute. If you compare this website
Can I write a hash code function for the following comparer logic? Two instances
I have an IEnumerable, listOfOnes, and an IEnumerable, listOfTwos. Assuming that I can compare
Can I compare a commit to a branch and see if there is a
How can I compare two dictionaries of different keys, such as the ones below?
How can I compare ref.WeakReference instance with another ref.WeakReference instance? The built-in equals method

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.