Operators in C++ what does (::Type*)0 meanWhat is the meaning of prepended double colon “::”?What are the differences between a pointer variable and a reference variable in C++?What does the explicit keyword mean?What are POD types in C++?The Definitive C++ Book Guide and ListWhat is the effect of extern “C” in C++?What is the “-->” operator in C++?What is move semantics?What is The Rule of Three?What are the basic rules and idioms for operator overloading?C++11 introduced a standardized memory model. What does it mean? And how is it going to affect C++ programming?

How to make the Bass in SATB move more smoothly?

Shorten or merge multiple lines of `&> /dev/null &`

What could a self-sustaining lunar colony slowly lose that would ultimately prove fatal?

WordPress 5.2.1 deactivated my jQuery

What is the meaning of "<&3" and "done < file11 3< file22"

When playing Edgar Markov, what is the definition of a "Vampire spell"?

Why A=2 and B=1 in the call signs for Spirit and Opportunity?

Why was this character made Grand Maester?

What did the 'turbo' button actually do?

Are runways booked by airlines to land their planes?

Dealing with spaghetti codebase, manager asks for things I can't deliver

How did NASA Langley end up with the first 737?

便利な工具 what does な means

Why would a rational buyer offer to buy with no conditions precedent?

Can you output map values in visualforce inline using a string key?

Job Market: should one hide their (young) age?

Expected maximum number of unpaired socks

Is it legal to have an abortion in another state or abroad?

Why did Drogon spare this character?

Where is Jon going?

I know that there is a preselected candidate for a position to be filled at my department. What should I do?

What's difference between "depends on" and "is blocked by" relations between issues in Jira next-gen board?

Do photons bend spacetime or not?

How to politely tell someone they did not hit "reply to all" in an email?



Operators in C++ what does (::Type*)0 mean


What is the meaning of prepended double colon “::”?What are the differences between a pointer variable and a reference variable in C++?What does the explicit keyword mean?What are POD types in C++?The Definitive C++ Book Guide and ListWhat is the effect of extern “C” in C++?What is the “-->” operator in C++?What is move semantics?What is The Rule of Three?What are the basic rules and idioms for operator overloading?C++11 introduced a standardized memory model. What does it mean? And how is it going to affect C++ programming?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








7















Can anyone tell me what this means?



(::Type*)0


actually it is part of this



return (is_modifytype()) ?
u.myfunction : (::Type*)0;









share|improve this question



















  • 21





    It means that this is old code that should be rewritten to use nullptr.

    – Sam Varshavchik
    8 hours ago

















7















Can anyone tell me what this means?



(::Type*)0


actually it is part of this



return (is_modifytype()) ?
u.myfunction : (::Type*)0;









share|improve this question



















  • 21





    It means that this is old code that should be rewritten to use nullptr.

    – Sam Varshavchik
    8 hours ago













7












7








7


1






Can anyone tell me what this means?



(::Type*)0


actually it is part of this



return (is_modifytype()) ?
u.myfunction : (::Type*)0;









share|improve this question
















Can anyone tell me what this means?



(::Type*)0


actually it is part of this



return (is_modifytype()) ?
u.myfunction : (::Type*)0;






c++






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 5 hours ago







Billal Ouali

















asked 8 hours ago









Billal OualiBillal Ouali

403




403







  • 21





    It means that this is old code that should be rewritten to use nullptr.

    – Sam Varshavchik
    8 hours ago












  • 21





    It means that this is old code that should be rewritten to use nullptr.

    – Sam Varshavchik
    8 hours ago







21




21





It means that this is old code that should be rewritten to use nullptr.

– Sam Varshavchik
8 hours ago





It means that this is old code that should be rewritten to use nullptr.

– Sam Varshavchik
8 hours ago












1 Answer
1






active

oldest

votes


















16














It means "cast the integer 0 (using a C-style cast) to the type Trip* (Trip pointer) found in the global namespace (::)".



It should just use nullptr - as in



return is_modifyCurrentTrip() ?
u.modifyCurrentTrip : nullptr;


Note: using :: explicitly to designate the global namespace prevents the compiler from prepending any namespace names itself - this is completely irrelevant when just using nullptr though.






share|improve this answer

























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f56259783%2foperators-in-c-what-does-type0-mean%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    16














    It means "cast the integer 0 (using a C-style cast) to the type Trip* (Trip pointer) found in the global namespace (::)".



    It should just use nullptr - as in



    return is_modifyCurrentTrip() ?
    u.modifyCurrentTrip : nullptr;


    Note: using :: explicitly to designate the global namespace prevents the compiler from prepending any namespace names itself - this is completely irrelevant when just using nullptr though.






    share|improve this answer





























      16














      It means "cast the integer 0 (using a C-style cast) to the type Trip* (Trip pointer) found in the global namespace (::)".



      It should just use nullptr - as in



      return is_modifyCurrentTrip() ?
      u.modifyCurrentTrip : nullptr;


      Note: using :: explicitly to designate the global namespace prevents the compiler from prepending any namespace names itself - this is completely irrelevant when just using nullptr though.






      share|improve this answer



























        16












        16








        16







        It means "cast the integer 0 (using a C-style cast) to the type Trip* (Trip pointer) found in the global namespace (::)".



        It should just use nullptr - as in



        return is_modifyCurrentTrip() ?
        u.modifyCurrentTrip : nullptr;


        Note: using :: explicitly to designate the global namespace prevents the compiler from prepending any namespace names itself - this is completely irrelevant when just using nullptr though.






        share|improve this answer















        It means "cast the integer 0 (using a C-style cast) to the type Trip* (Trip pointer) found in the global namespace (::)".



        It should just use nullptr - as in



        return is_modifyCurrentTrip() ?
        u.modifyCurrentTrip : nullptr;


        Note: using :: explicitly to designate the global namespace prevents the compiler from prepending any namespace names itself - this is completely irrelevant when just using nullptr though.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 7 hours ago

























        answered 8 hours ago









        Jesper JuhlJesper Juhl

        18.8k32751




        18.8k32751





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f56259783%2foperators-in-c-what-does-type0-mean%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

            Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

            In Tikz, how to set a node's label alignment to the left?Rotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?Numerical conditional within tikz keys?TikZ/ERD: node (=Entity) label on the insideLine up nested tikz enviroments or how to get rid of themVertically align a tikzpicture and forestDrawing tikz line in the margin for multiple pagesLongtable, contained tikz, padding, custom columns, and an alignment issueTikZ: define arrow starting position based on style and format node labelAlign node name in Tikz