[Development] QtDriveInfo module in Playground

Olivier Goffart olivier at woboq.com
Fri Mar 1 10:52:41 CET 2013

On Friday 01 March 2013 08:51:16 Laszlo Papp wrote:
> qdisplayinfo_linux.cpp: In function
> '{anonymous}::Q_QGS_BACKLIGHT_SYSFS_PATH::Type*
> {anonymous}::Q_QGS_BACKLIGHT_SYSFS_PATH::innerFunction()':
> qdisplayinfo_linux.cpp:50:1: error: lambda-expression in unevaluated context

qdisplayinfo_linux.cpp:50 is:

And the new Q_GLOBAL_STATIC implementation does:
[...]        Holder()                                            \
               Q_DECL_NOEXCEPT_EXPR(noexcept(Type ARGS))       \
                : value ARGS                                    \

QStringLiteral is implemented using labda expression to get an anonymous 
scope.   But lambda sexpression are not allowed in noexcept.

Is that something we should fix in Q_GLOBAL_STATIC_WITH_ARGS ?  or should we 
jsut say that lambda expressions or QStringLiteral are not allowed in 


Woboq - Qt services and support - http://woboq.com - http://code.woboq.org

More information about the Development mailing list