Wikipedia:WikiProject Business and Auto ptr: Difference between pages

(Difference between pages)
Content deleted Content added
 
DanielKO (talk | contribs)
mNo edit summary
 
Line 1:
{{wrongtitle|title=auto_ptr}}
<div align="centre">''At the moment, the Wikipedia is strongest in the areas of science, technology and background articles on current events...Try to find financial or investment information, however, and you'll probably be disappointed.'' - [http://www.forbes.com/best/2004/1213/bow001.html Forbes]''</div>
 
'''auto_ptr''' is a [[Template (programming) | template]] class available in the [[C_plus_plus|C++]] [[C Plus Plus standard library | Standard Library]] (declared in '''<memory>''') that provides some basic [[Resource Acquisition Is Initialization | RAII]] features for [[Pointers#C.2FC.2B.2B | C++ raw pointers]].
The broad objectives of the '''Business and Economics [[Wikipedia:WikiProjects|Wikiproject]]''' is to expand the coverage and content of articles related to [[Business]] and [[Economics]]. More specifically, we need to have more business and economics related [[WP:FA|Featured articles]] and more regular coverage for business and economics news in [[current events]].
{{portalpar|Business and Economics}}
{{Shortcut|[[WP:BIZE]]}}
 
== Definition ==
The scope of this project is to provide guidelines on topics related to [[Business]] and [[Economics]] and provide a space, where users can collaborate to improve related articles.
 
The auto_ptr class is defined in [[ISO/IEC 14882]], section 20.4.5 as:
== Projects ==
* [[Wikipedia:Companies, corporations and economic information|Companies, corporations and economic information]]
* [[Wikipedia:WikiProject Numismatics|Numismatics]]
* [[Wikipedia:WikiProject Game theory|Game theory]]
* [[Wikipedia:WikiProject Deletion sorting/Business]]
 
namespace std {
==Participants==
* pamri
template <class Y> struct auto_ptr_ref {};
* Saksham
template<class X>
class auto_ptr {
public:
typedef X element_type;
// 20.4.5.1 construct/copy/destroy:
explicit auto_ptr(X* p =0) throw();
auto_ptr(auto_ptr&) throw();
template<class Y> auto_ptr(auto_ptr<Y>&) throw();
auto_ptr& operator=(auto_ptr&) throw();
template<class Y> auto_ptr& operator=(auto_ptr<Y>&) throw();
auto_ptr& operator=(auto_ptr_ref<X> r) throw();
~auto_ptr() throw();
// 20.4.5.2 members:
X& operator*() const throw();
X* operator->() const throw();
X* get() const throw();
X* release() throw();
void reset(X* p =0) throw();
// 20.4.5.3 conversions:
auto_ptr(auto_ptr_ref<X>) throw();
template<class Y> operator auto_ptr_ref<Y>() throw();
template<class Y> operator auto_ptr<Y>() throw();
};
}
 
==Structure==
 
== Semantics ==
<!--
Discuss the format for each article based on the WikiProject. Include various categories applicable to the topic.
-->
 
The auto_ptr has semantics of strict ownership, meaning that the auto_ptr instance is the sole responsible for the object's life-time. If an auto_ptr is copied, the source loses the reference. For example:
==Goals==
# Create templates & guidelines for topics on Economic Indicators and National economies.
 
int *i = new int;
<!--This section is for organizing group projects-->
auto_ptr<int> x(i);
==Tasks==
auto_ptr<int> y;
{{Bizetasks}}
y = x;
cout << x.get() << endl;
cout << y.get() << endl;
 
This code will print a [[Null (Computer) | NULL]] reference for the first auto_ptr object and some address for the second, showing that the source object lost the reference during the assignment (''=''). The raw pointer ''i'' in the example should not be deleted, as it will be deleted by the auto_ptr that owns the reference.
==Adopt an article==
Similar to the [[Wikipedia:Collaboration of the week|Collaboration of the week]], but on a smaller scale, you might want to "adopt" an article. This would involve doing the research, writing, and picture-taking (if possible) for either a non-existent article or a stub. Of course, everyone else can still edit an adopted article, and you can work on other things too, but the idea is to find a focus for a while, to try and build up the number of quality articles the Project has produced.
* [[Example|Example article]]: [[User:Example]]
*
<!--Check [[Wikipedia:WikiProject Melbourne#Adopt an article]] to see how this section is used.-->
 
Notice that the object pointed by an auto_ptr is destructed using ''operator delete''; this means that you should only use auto_ptr for pointers obtained with ''operator new''. This excludes pointers returned by [[malloc|malloc/calloc/realloc]] and ''operator new[]''.
==General strategy and discussion forums==
*[[/General]]
*[[/Strategy]]
 
==Other subpages==
 
{{uncategorized}}
==Templates==
 
===Infoboxes===
* {{substemplate|template}}
* e.g.<nowiki>{{</nowiki>Infobox Business and Economics<nowiki>}}</nowiki>
{{template|Infobox Business and Economics }}
 
<br style="clear: both">
 
===Stub templates===
*e.g. <nowiki>{{</nowiki>Business and Economics-stub<nowiki>}}</nowiki>
*{{template|Business and Economics-stub}}
 
<!--stubs are managed by the [[WP:WSS:Stub-sorting WikiProject]]. *To propose new stub categories/templates, see [[Wikipedia:WikiProject Stub sorting/Criteria#Proposed new stubs|Stub sorting criteria: Proposed new stubs]].-->
 
===Other templates===
 
* {{template|template}}
 
{{templateBusiness and Economics }}
 
==Categories==
*[[:Category:Business and Economics]]
 
==Lists==
* [[List of publications in economics]]
 
==Articles==
;At Collaborations
Please list business and Economics articles at these collaborations:
* [[WP:AID|Article improvement drive]]
** ''none at the moment''
* [[WP:COTW|Collaboration of the week]]
** ''none at the moment''
* [[WP:PR|Peer review]]
** ''none at the moment''
 
;Featured content
* [[/Featured content]] : is a list of articles, lists & Pictures that are already featured
 
;Featured content candidates
Please list business and Economics featured articles at these places:
* [[WP:FAC|Featured article candidates]]
** ''none at the moment''
* [[WP:FPC|Featured picture candidates]]
** ''none at the moment''
* [[WP:FLC|Featured list candidates]]
** ''none at the moment''
 
[[Category:WikiProject Business and Economics|Business and Economics]]