aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-02-08 14:38:27 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-02-08 14:38:27 +0200
commitde1efc8c401418269bdbc28b9e8eeaff5b746c45 (patch)
tree1f590903cf1d44f75c908422c069637fbb38ca28
parent26500654a6662e00cc86383f9ed83c4e439adcef (diff)
Use initializer_list only if Qt believe they are supported2.4.0
-rw-r--r--odb/qt/containers/list.hxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/odb/qt/containers/list.hxx b/odb/qt/containers/list.hxx
index 44ec383..a89ac91 100644
--- a/odb/qt/containers/list.hxx
+++ b/odb/qt/containers/list.hxx
@@ -13,7 +13,8 @@
#ifdef ODB_CXX11
# include <utility> // std::move
-# ifdef ODB_CXX11_INITIALIZER_LIST
+# if defined(ODB_CXX11_INITIALIZER_LIST) && \
+ defined(Q_COMPILER_INITIALIZER_LISTS)
# include <initializer_list>
# endif
#endif
@@ -48,7 +49,8 @@ public:
#ifdef ODB_CXX11
QOdbList(QOdbList &&x): vector_base (std::move (x)), l_ (std::move (x.l_)) {}
QOdbList &operator=(QOdbList &&other);
-#ifdef ODB_CXX11_INITIALIZER_LIST
+#if defined(ODB_CXX11_INITIALIZER_LIST) && \
+ defined(Q_COMPILER_INITIALIZER_LISTS)
QOdbList(std::initializer_list<T> il): l_ (il) {}
#endif
#endif