From de1efc8c401418269bdbc28b9e8eeaff5b746c45 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 8 Feb 2015 14:38:27 +0200 Subject: Use initializer_list only if Qt believe they are supported --- odb/qt/containers/list.hxx | 6 ++++-- 1 file 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 // std::move -# ifdef ODB_CXX11_INITIALIZER_LIST +# if defined(ODB_CXX11_INITIALIZER_LIST) && \ + defined(Q_COMPILER_INITIALIZER_LISTS) # include # 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 il): l_ (il) {} #endif #endif -- cgit v1.1