Hello All, I have been trying to understand the smart pointer library. One thing that I did not understand was in the documentationin quite beginning: "T may be an incomplete type at the point of smart pointer declaration. Unless otherwise specified, it is required that T be a complete type at points of smart pointer instantiation." So what exactly does this incomplete/complete type mean? Does this have anything to do with the class pointed to being abstract /concrete ? thanks, regards, amit.
Amit, it means this code is valid: class Whatever; class Another { boost::shared_ptr< Whatever > ptr; }; Notice that the full definition of Whatever is not given. When you define the Another constructor, the class Whatever must be completely defined. Jason Winnebeck Amit Bhatia wrote:
Hello All, I have been trying to understand the smart pointer library. One thing that I did not understand was in the documentationin quite beginning:
"T may be an incomplete type at the point of smart pointer declaration. Unless otherwise specified, it is required that T be a complete type at points of smart pointer instantiation."
So what exactly does this incomplete/complete type mean? Does this have anything to do with the class pointed to being abstract /concrete ?
thanks, regards, amit.
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
participants (2)
-
Amit Bhatia
-
Jason Winnebeck