trivial or non-trivial object

Discussion in 'C++' started by baibaichen, Jan 12, 2006.

  1. baibaichen

    baibaichen Guest

    hi, i am reading a C++ book, it mentions a term non-trivial object.
    what i understand is:
    if a object has:
    a) trivial constructor
    b) trivial assignment operator
    c) trivial destructor

    then it is a trvial object, otherwise it is a non trivial obect, right?

    thanks
    baibaichen, Jan 12, 2006
    #1
    1. Advertising

  2. * baibaichen:
    > hi, i am reading a C++ book, it mentions a term non-trivial object.
    > what i understand is:
    > if a object has:
    > a) trivial constructor
    > b) trivial assignment operator
    > c) trivial destructor
    >
    > then it is a trvial object, otherwise it is a non trivial obect, right?


    "Trivial object" is not a term defined by the standard or in common use as a
    technical term. It probably means just what it says, like, "green bird".

    --
    A: Because it messes up the order in which people normally read text.
    Q: Why is it such a bad thing?
    A: Top-posting.
    Q: What is the most annoying thing on usenet and in e-mail?
    Alf P. Steinbach, Jan 12, 2006
    #2
    1. Advertising

  3. baibaichen

    Jim Langston Guest

    "baibaichen" <> wrote in message
    news:...
    > hi, i am reading a C++ book, it mentions a term non-trivial object.
    > what i understand is:
    > if a object has:
    > a) trivial constructor
    > b) trivial assignment operator
    > c) trivial destructor
    >
    > then it is a trvial object, otherwise it is a non trivial obect, right?
    >
    > thanks


    "trivial object" is not a standard C++ term. He is probably refering to POD
    or not. POD being plain old data.
    Jim Langston, Jan 12, 2006
    #3
  4. baibaichen

    osmium Guest

    "baibaichen" writes:

    > hi, i am reading a C++ book, it mentions a term non-trivial object.
    > what i understand is:
    > if a object has:
    > a) trivial constructor
    > b) trivial assignment operator
    > c) trivial destructor
    >
    > then it is a trvial object, otherwise it is a non trivial obect, right?


    There are a bunch of hits on Google for <trivial object c++>.
    osmium, Jan 12, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. William Payne
    Replies:
    5
    Views:
    454
    William Payne
    Oct 12, 2004
  2. Michal Raburski

    wxPtyhon 2.4 non trivial problems :D

    Michal Raburski, Mar 11, 2005, in forum: Python
    Replies:
    0
    Views:
    266
    Michal Raburski
    Mar 11, 2005
  3. Eric Lilja
    Replies:
    2
    Views:
    324
    Eric Lilja
    Aug 14, 2007
  4. Johannes Bauer
    Replies:
    25
    Views:
    7,513
    James Kanze
    Jul 31, 2010
  5. Jon Egil Stand
    Replies:
    2
    Views:
    92
    Jon Egil Stand
    Mar 8, 2007
Loading...

Share This Page