point operator added
git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@371 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
9ec0d8ee64
commit
75722359cf
2 changed files with 10 additions and 1 deletions
|
@ -58,7 +58,13 @@ namespace Loki
|
||||||
return *val_;
|
return *val_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
T* operator->()
|
||||||
|
{
|
||||||
|
return val_;
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
OrderedStaticBase(unsigned int longevity) : val_(0), longevity_(longevity)
|
OrderedStaticBase(unsigned int longevity) : val_(0), longevity_(longevity)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,7 +124,7 @@ int main()
|
||||||
|
|
||||||
std::string s("text11");
|
std::string s("text11");
|
||||||
*s1=s;
|
*s1=s;
|
||||||
std::cout << "value of s1: " << (*s1).c_str() << "\n";
|
std::cout << "value of s1: " << s1->c_str() << "\n";
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
@ -137,6 +137,9 @@ int main()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::cout << "\n";
|
std::cout << "\n";
|
||||||
|
|
||||||
|
system("pause");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue