Skip to content
Snippets Groups Projects
Commit ab5a73f2 authored by Oliver Sander's avatar Oliver Sander
Browse files

rename the method count() to use_count(). This is the naming of the standard...

rename the method count() to use_count().  This is the naming of the standard shared-pointer implementation

[[Imported from SVN: r5641]]
parent 318946c6
No related branches found
No related tags found
No related merge requests found
......@@ -79,7 +79,10 @@ namespace Dune
* pointers reference it.
*/
inline void deallocate();
int count() const;
/** \brief The number of shared_ptrs pointing to the object we point to */
int use_count() const;
private:
/** @brief The object we reference. */
class PointerRep
......
......@@ -19,7 +19,7 @@ int main(){
shared_ptr<double> d(b);
*b = 7;
}
if(b.count()!=1) {
if(b.use_count()!=1) {
std::cout << "Reference count is wrong! "<<__LINE__<<":"<<
__FILE__<<std::endl;
ret=1;
......@@ -32,7 +32,7 @@ int main(){
__FILE__<<std::endl;
ret=1;
}
if(b.count()!=2 || c.count()!=2) {
if(b.use_count()!=2 || c.use_count()!=2) {
std::cout << "Reference count is wrong! "<<__LINE__<<":"<<
__FILE__<<std::endl;
ret=1;
......@@ -45,7 +45,7 @@ int main(){
}
}
if(b.count()!=1) {
if(b.use_count()!=1) {
std::cout << "Reference count is wrong! "<<__LINE__<<":"<<
__FILE__<<std::endl;
ret=1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment