Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old January 12th, 2006, 02:05 AM
baibaichen
Guest
 
Posts: n/a
Default trivial or non-trivial object

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

  #2  
Old January 12th, 2006, 02:25 AM
Alf P. Steinbach
Guest
 
Posts: n/a
Default Re: trivial or non-trivial object

* baibaichen:[color=blue]
> 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?[/color]

"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?
  #3  
Old January 12th, 2006, 10:25 AM
Jim Langston
Guest
 
Posts: n/a
Default Re: trivial or non-trivial object

"baibaichen" <baibaichen@gmail.com> wrote in message
news:1137030697.498096.111670@f14g2000cwb.googlegr oups.com...[color=blue]
> 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[/color]

"trivial object" is not a standard C++ term. He is probably refering to POD
or not. POD being plain old data.


  #4  
Old January 12th, 2006, 03:15 PM
osmium
Guest
 
Posts: n/a
Default Re: trivial or non-trivial object

"baibaichen" writes:
[color=blue]
> 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?[/color]

There are a bunch of hits on Google for <trivial object c++>.


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles