]> granicus.if.org Git - clang/commit
In C++14 onwards, it is permitted to read mutable members in constant
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 21 Feb 2018 03:38:30 +0000 (03:38 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 21 Feb 2018 03:38:30 +0000 (03:38 +0000)
commit39c53a9a3adb66a266d2879e1ae61aa3a8e7e321
treeede763067e306ac1361e0120d3ff29df6ffa95eb
parentf816682dc82cced0bc9ad79f0aa33125b4210aea
In C++14 onwards, it is permitted to read mutable members in constant
expressions, if their lifetime began during the evaluation of the expression.

This is technically not allowed in C++11, though we could consider permitting
it there too, as an extension.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@325663 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/ExprConstant.cpp
test/SemaCXX/constant-expression-cxx1y.cpp