diff options
author | John Wiegley <johnw@newartisans.com> | 2012-05-20 15:03:22 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-05-20 15:03:22 -0500 |
commit | a9bdcc33013b5e1e76571ee1104bd8c7f278e775 (patch) | |
tree | 5c71b678e8180cc49dd6a8ad7bc27ce1abaf24ad /src/utils.h | |
parent | 1b83c684fbb88b40a4b3b7114a9116b0e582bc67 (diff) | |
download | fork-ledger-a9bdcc33013b5e1e76571ee1104bd8c7f278e775.tar.gz fork-ledger-a9bdcc33013b5e1e76571ee1104bd8c7f278e775.tar.bz2 fork-ledger-a9bdcc33013b5e1e76571ee1104bd8c7f278e775.zip |
Work around collision between Format's put & Graph
Diffstat (limited to 'src/utils.h')
-rw-r--r-- | src/utils.h | 94 |
1 files changed, 0 insertions, 94 deletions
diff --git a/src/utils.h b/src/utils.h index cbcfb131..893b3d70 100644 --- a/src/utils.h +++ b/src/utils.h @@ -80,12 +80,7 @@ namespace ledger { using namespace boost; -#if !HAVE_CXX11 && (VERIFY_ON || HAVE_BOOST_PYTHON) - class string; -#else typedef std::string string; -#endif - typedef std::list<string> strings_list; typedef posix_time::ptime ptime; @@ -100,14 +95,6 @@ namespace ledger { typedef boost::filesystem::filesystem_error filesystem_error; } -#if BOOST_FILESYSTEM_VERSION == 3 -#if !HAVE_CXX11 && (VERIFY_ON || HAVE_BOOST_PYTHON) -namespace boost { namespace filesystem3 { namespace path_traits { -template<> struct is_pathable<ledger::string> { static const bool value = true; }; -}}} -#endif // VERIFY_ON || HAVE_BOOST_PYTHON -#endif // BOOST_FILESYSTEM_VERSION == 3 - /*@}*/ /** @@ -201,87 +188,6 @@ void report_memory(std::ostream& out, bool report_all = false); namespace ledger { -#if !HAVE_CXX11 && (VERIFY_ON || HAVE_BOOST_PYTHON) - -class string : public std::string -{ -public: - string(); - string(const string& str); - string(const std::string& str); - string(size_type len, char x); - template<class _InputIterator> - string(_InputIterator __beg, _InputIterator __end) - : std::string(__beg, __end) { - TRACE_CTOR(string, "InputIterator, InputIterator"); - } - string(const char * str); - string(const char * str, const char * end); - string(const string& str, size_type x); - string(const string& str, size_type x, size_type y); - string(const char * str, size_type x); - string(const char * str, size_type x, size_type y); - ~string() throw(); - -#if HAVE_BOOST_SERIALIZATION -private: - /** Serialization. */ - - friend class boost::serialization::access; - - template<class Archive> - void serialize(Archive& ar, const unsigned int /* version */) { - ar & boost::serialization::base_object<std::string>(*this); - } -#endif // HAVE_BOOST_SERIALIZATION -}; - -inline string operator+(const string& __lhs, const string& __rhs) -{ - string __str(__lhs); - __str.append(__rhs); - return __str; -} - -string operator+(const char* __lhs, const string& __rhs); -string operator+(char __lhs, const string& __rhs); - -inline string operator+(const string& __lhs, const char* __rhs) -{ - string __str(__lhs); - __str.append(__rhs); - return __str; -} - -inline string operator+(const string& __lhs, char __rhs) -{ - typedef string __string_type; - typedef string::size_type __size_type; - __string_type __str(__lhs); - __str.append(__size_type(1), __rhs); - return __str; -} - -inline bool operator==(const string& __lhs, const string& __rhs) -{ return __lhs.compare(__rhs) == 0; } - -inline bool operator==(const char* __lhs, const string& __rhs) -{ return __rhs.compare(__lhs) == 0; } - -inline bool operator==(const string& __lhs, const char* __rhs) -{ return __lhs.compare(__rhs) == 0; } - -inline bool operator!=(const string& __lhs, const string& __rhs) -{ return __rhs.compare(__lhs) != 0; } - -inline bool operator!=(const char* __lhs, const string& __rhs) -{ return __rhs.compare(__lhs) != 0; } - -inline bool operator!=(const string& __lhs, const char* __rhs) -{ return __lhs.compare(__rhs) != 0; } - -#endif // !HAVE_CXX11 && (VERIFY_ON || HAVE_BOOST_PYTHON) - extern string empty_string; strings_list split_arguments(const char * line); |