Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Language

C++

Compiler

clang HEAD 8.0.0 (https://github.com/llvm-mirror/clang.git 446ad5873657e07917ecf631dd778863d27eb122) (https://github.com/llvm-mirror/llvm.git c315e740ba0bfb35dd4e683b0bc14d38c9b981d0)

Options
Warnings
Don't Use Boost
C++17
no pedantic

$ clang++ prog.cc -Wall -Wextra -std=c++17
prog.cc:10:26: error: chosen constructor is explicit in copy-initialization
    [[maybe_unused]] foo f2 = {};//error: chosen constructor is explicit in copy-initialization
                         ^    ~~
prog.cc:3:14: note: explicit constructor declared here
    explicit foo(int n = 0) : n(n) {}
             ^
1 error generated.
Exit Code:
1