Interesting.  Another workaround is probably to make it constexpr<br><div class="gmail_quote"><div dir="ltr">On Thu, Mar 2, 2017 at 7:50 AM Pavel Labath <<a href="mailto:labath@google.com">labath@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">FAILED: C:\PROGRA~2\MICROS~3.0\VC\bin\cl.exe   /nologo /TP<br class="gmail_msg">
-DGTEST_HAS_RTTI=0 -DLLDB_DISABLE_CURSES -DLLDB_DISABLE_LIBEDIT<br class="gmail_msg">
-DLLDB_PYTHON_HOME=\"C:/Users/lldb_build/ll/prebuilts/python-2015/x86\"<br class="gmail_msg">
-DLLDB_USE_BUILTIN_DEMANGLER -DLLVM_BUILD_GLOBAL_ISEL -DUNICODE<br class="gmail_msg">
-D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS<br class="gmail_msg">
-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS<br class="gmail_msg">
-D_FILE_OFFSET_BITS=64 -D_HAS_EXCEPTIONS=0 -D_LARGEFILE_SOURCE<br class="gmail_msg">
-D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE<br class="gmail_msg">
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS<br class="gmail_msg">
-Itools\lldb\source\Commands<br class="gmail_msg">
-IC:\lldbSlave\lldb-win7-android\llvm\tools\lldb\source\Commands<br class="gmail_msg">
-IC:\lldbSlave\lldb-win7-android\llvm\tools\lldb\include<br class="gmail_msg">
-Itools\lldb\include -Iinclude<br class="gmail_msg">
-IC:\lldbSlave\lldb-win7-android\llvm\include<br class="gmail_msg">
-IC:\Users\lldb_build\ll\prebuilts\python-2015\x86\Include<br class="gmail_msg">
-IC:\lldbSlave\lldb-win7-android\llvm\tools\clang\include<br class="gmail_msg">
-Itools\lldb\..\clang\include<br class="gmail_msg">
-IC:\lldbSlave\lldb-win7-android\llvm\tools\lldb\source\. /DWIN32<br class="gmail_msg">
/D_WINDOWS   /W4 -wd4141 -wd4146 -wd4180 -wd4244 -wd4258 -wd4267<br class="gmail_msg">
-wd4291 -wd4345 -wd4351 -wd4355 -wd4456 -wd4457 -wd4458 -wd4459<br class="gmail_msg">
-wd4503 -wd4624 -wd4722 -wd4800 -wd4100 -wd4127 -wd4512 -wd4505<br class="gmail_msg">
-wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703<br class="gmail_msg">
-wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319<br class="gmail_msg">
-wd4324 -w14062 -we4238 /Zc:inline /Zc:strictStrings /Oi<br class="gmail_msg">
/Zc:rvalueCast /MD /O2 /Ob2 /D NDEBUG   -wd4018 -wd4068 -wd4150<br class="gmail_msg">
-wd4251 -wd4521 -wd4530  /EHs-c- /GR- /showIncludes<br class="gmail_msg">
/Fotools\lldb\source\Commands\CMakeFiles\lldbCommands.dir\CommandObjectFrame.cpp.obj<br class="gmail_msg">
/Fdtools\lldb\source\Commands\CMakeFiles\lldbCommands.dir\ /FS -c<br class="gmail_msg">
C:\lldbSlave\lldb-win7-android\llvm\tools\lldb\source\Commands\CommandObjectFrame.cpp<br class="gmail_msg">
C:\lldbSlave\lldb-win7-android\llvm\tools\lldb\source\Commands\CommandObjectFrame.cpp(202):<br class="gmail_msg">
error C3493: 'qualify_cxx_base_classes' cannot be implicitly captured<br class="gmail_msg">
because no default capture mode has been specified<br class="gmail_msg">
ninja: build stopped: subcommand failed.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
Basically, clang and gcc are perfectly happy with you referencing a<br class="gmail_msg">
const variable (maybe it has to be of integral type) from a lambda<br class="gmail_msg">
without an explicit capture (a behavior which actually quite surprises<br class="gmail_msg">
me), but MSVC chokes on that.<br class="gmail_msg">
<br class="gmail_msg">
The compiler is MSCV 2015, but I don't know which update. This is its<br class="gmail_msg">
ident string, if that means anything to you:<br class="gmail_msg">
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x86<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
On 2 March 2017 at 15:18, Zachary Turner <<a href="mailto:zturner@google.com" class="gmail_msg" target="_blank">zturner@google.com</a>> wrote:<br class="gmail_msg">
> What capture does it say is missing? Also what version of msvc?<br class="gmail_msg">
><br class="gmail_msg">
> On Thu, Mar 2, 2017 at 7:17 AM Zachary Turner <<a href="mailto:zturner@google.com" class="gmail_msg" target="_blank">zturner@google.com</a>> wrote:<br class="gmail_msg">
>><br class="gmail_msg">
>> Clang-cl<br class="gmail_msg">
>> On Thu, Mar 2, 2017 at 2:51 AM Pavel Labath <<a href="mailto:labath@google.com" class="gmail_msg" target="_blank">labath@google.com</a>> wrote:<br class="gmail_msg">
>>><br class="gmail_msg">
>>><br class="gmail_msg">
>>> On 2 March 2017 at 00:05, Zachary Turner via lldb-commits<br class="gmail_msg">
>>> <<a href="mailto:lldb-commits@lists.llvm.org" class="gmail_msg" target="_blank">lldb-commits@lists.llvm.org</a>> wrote:<br class="gmail_msg">
>>>><br class="gmail_msg">
>>>> -    DumpValueObjectOptions::DeclPrintingHelper helper =<br class="gmail_msg">
>>>> -        [&valobj_sp, qualify_cxx_base_classes](<br class="gmail_msg">
>>>> -            ConstString type, ConstString var,<br class="gmail_msg">
>>>> -            const DumpValueObjectOptions &opts, Stream &stream) -> bool<br class="gmail_msg">
>>>> {<br class="gmail_msg">
>>>> +    DumpValueObjectOptions::DeclPrintingHelper helper = [&valobj_sp](<br class="gmail_msg">
>>>> +        ConstString type, ConstString var, const DumpValueObjectOptions<br class="gmail_msg">
>>>> &opts,<br class="gmail_msg">
>>>> +        Stream &stream) -> bool {<br class="gmail_msg">
>>>>        const ValueObject::GetExpressionPathFormat format = ValueObject::<br class="gmail_msg">
>>><br class="gmail_msg">
>>><br class="gmail_msg">
>>> Hi Zach,<br class="gmail_msg">
>>><br class="gmail_msg">
>>> what's the compiler that was giving you this warning. The version of MSVC<br class="gmail_msg">
>>> I am using is complaining about a missing capture when you removed this.<br class="gmail_msg">
>>><br class="gmail_msg">
>>> I've updated the code in a way which should make both compilers<br class="gmail_msg">
>>> satisfied, but I'd like to know if we are using an unsupported version of<br class="gmail_msg">
>>> MSVC or something.<br class="gmail_msg">
>>><br class="gmail_msg">
>>> cheers,<br class="gmail_msg">
>>> pl<br class="gmail_msg">
>>><br class="gmail_msg">
><br class="gmail_msg">
</blockquote></div>