Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 7 years ago

Language

C++

Compiler

clang HEAD 8.0.0 (https://github.com/llvm-mirror/clang.git 651282142f9f33ecb045d3f9784d3c2cd5558d37) (https://github.com/llvm-mirror/llvm.git 81f99ce8f5aa40af5f7f55926073c6da3fb0907a)

Options
Warnings
Boost 1.67.0
C++2a(GNU)
no pedantic

Author

anonymous

over 7 years ago

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.67.0/clang-head/include -std=gnu++2a
prog.cc:20:14: error: constructor for 'MyOtherClass<char>' must explicitly initialize the member 'stuff_' which does not have a default constructor
    explicit MyOtherClass(const R& val)
             ^
prog.cc:32:24: note: in instantiation of member function 'MyOtherClass<char>::MyOtherClass' requested here
    MyOtherClass<char> m({});
                       ^
prog.cc:26:16: note: member is declared here
    MyClass<R> stuff_;
               ^
prog.cc:4:7: note: 'MyClass<char>' declared here
class MyClass
      ^
prog.cc:20:14: error: constructor for 'MyOtherClass<char>' must explicitly initialize the member 'another_stuff_' which does not have a default constructor
    explicit MyOtherClass(const R& val)
             ^
prog.cc:27:18: note: member is declared here
    MyClass<int> another_stuff_;
                 ^
prog.cc:4:7: note: 'MyClass<int>' declared here
class MyClass
      ^
prog.cc:22:9: error: type 'MyClass<char>' does not provide a call operator
        stuff_(val); 
        ^~~~~~
prog.cc:23:9: error: type 'MyClass<int>' does not provide a call operator
        another_stuff_(56);
        ^~~~~~~~~~~~~~
4 errors generated.
Exit Code:
1