Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 6 years ago

Language

C++

Compiler

clang HEAD 9.0.0 (https://github.com/llvm-mirror/clang.git 6ed0749151866894a67a3e7eefdc1f3a547daa0e) (https://github.com/llvm-mirror/llvm.git a10a70238ace1093cad3adeb94814b422bd1b5c1)

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

Author

anonymous

almost 6 years ago

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/clang-head/include -std=gnu++2a
prog.cc:15:11: error: no member named 'first' in 'std::__1::unique_ptr<a_struct, std::__1::default_delete<a_struct> >'; did you mean to use '->' instead of '.'?
    my_ptr.first = "A";
          ^
          ->
prog.cc:15:20: error: assigning to 'char' from incompatible type 'const char [2]'
    my_ptr.first = "A";
                   ^~~
prog.cc:16:11: error: no member named 'second' in 'std::__1::unique_ptr<a_struct, std::__1::default_delete<a_struct> >'; did you mean to use '->' instead of '.'?
    my_ptr.second = 2;
          ^
          ->
prog.cc:17:11: error: no member named 'third' in 'std::__1::unique_ptr<a_struct, std::__1::default_delete<a_struct> >'; did you mean to use '->' instead of '.'?
    my_ptr.third = 3.00;
          ^
          ->
prog.cc:19:33: error: no member named 'first' in 'std::__1::unique_ptr<a_struct, std::__1::default_delete<a_struct> >'; did you mean to use '->' instead of '.'?
    printf("%c\n%i\n%f\n",my_ptr.first, my_ptr.second, my_ptr.third);
                                ^
                                ->
prog.cc:19:47: error: no member named 'second' in 'std::__1::unique_ptr<a_struct, std::__1::default_delete<a_struct> >'; did you mean to use '->' instead of '.'?
    printf("%c\n%i\n%f\n",my_ptr.first, my_ptr.second, my_ptr.third);
                                              ^
                                              ->
prog.cc:19:62: error: no member named 'third' in 'std::__1::unique_ptr<a_struct, std::__1::default_delete<a_struct> >'; did you mean to use '->' instead of '.'?
    printf("%c\n%i\n%f\n",my_ptr.first, my_ptr.second, my_ptr.third);
                                                             ^
                                                             ->
7 errors generated.
Exit Code:
1