Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 6 years ago

Language

C++

Compiler

clang HEAD 8.0.0 (https://github.com/llvm-mirror/clang.git 710518321bb5cae09e462db3c5eb50f2fc711e57) (https://github.com/llvm-mirror/llvm.git 3946ac6232ac0d17e8e1fdd85e93cf9dd86d1eaa)

Options
Warnings
Boost 1.68.0
C++17
no pedantic

Author

anonymous

over 6 years ago

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/clang-head/include -std=c++17
prog.cc:6:30: warning: expression result unused [-Wunused-value]
    auto lambda = []{return (c, 2);};
                             ^
prog.cc:6:30: error: variable 'c' cannot be implicitly captured in a lambda with no capture-default specified
prog.cc:5:19: note: 'c' declared here
    constexpr int c = 1;
                  ^
prog.cc:6:19: note: lambda expression begins here
    auto lambda = []{return (c, 2);};
                  ^
1 warning and 1 error generated.
Exit Code:
1