| … | … | @@ -47,6 +47,11 @@ namespace opencog |
| 47 | 47 | */ |
| 48 | 48 | unsigned int bitcount(unsigned long n); |
| 49 | 49 | |
| 50 | #ifndef WIN32 |
| 51 | /// Demangle c++ function names. |
| 52 | std::string demangle(const std::string& mangled); |
| 53 | #endif |
| 54 | |
| 50 | 55 | template <typename _OutputIterator> |
| 51 | 56 | void tokenize(const std::string& str, |
| 52 | 57 | _OutputIterator tokens, |
| … | … | @@ -68,21 +73,6 @@ void tokenize(const std::string& str, |
| 68 | 73 | } |
| 69 | 74 | } |
| 70 | 75 | |
| 71 | | template<typename _T> |
| 72 | | struct safe_deleter |
| 73 | | { |
| 74 | | void operator()(_T*& __ptr) { |
| 75 | | if (__ptr) { |
| 76 | | delete __ptr; |
| 77 | | __ptr = 0; |
| 78 | | } |
| 79 | | } |
| 80 | | }; |
| 81 | | |
| 82 | | #ifndef WIN32 |
| 83 | | std::string demangle(const std::string& mangled); |
| 84 | | #endif |
| 85 | | |
| 86 | 76 | /** @}*/ |
| 87 | 77 | } // namespace opencog |
| 88 | 78 | |