summaryrefslogtreecommitdiff
path: root/src/utils.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2011-02-04 22:39:41 -0500
committerJohn Wiegley <johnw@newartisans.com>2011-02-04 22:39:41 -0500
commit2208ac1226bb3be82be550d465f08fc1dd7c1bae (patch)
tree35ac78b7e439263c24a14c1fe214fd5db61745f9 /src/utils.h
parente0c42ff44352b414e8a6ea3ba735afea98db6d18 (diff)
downloadledger-2208ac1226bb3be82be550d465f08fc1dd7c1bae.tar.gz
ledger-2208ac1226bb3be82be550d465f08fc1dd7c1bae.tar.bz2
ledger-2208ac1226bb3be82be550d465f08fc1dd7c1bae.zip
Fixes for compilation as C++0x code
Diffstat (limited to 'src/utils.h')
-rw-r--r--src/utils.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils.h b/src/utils.h
index 002306d0..44ee2c02 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -523,7 +523,13 @@ inline void check_for_signal() {
*/
/*@{*/
+#if (__cplusplus > 199711)
+#define foreach(x, y) for (x : y)
+#define unique_ptr std::unique_ptr
+#else
#define foreach BOOST_FOREACH
+#define unique_ptr std::auto_ptr
+#endif
namespace ledger {