Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 6 years ago

Language

C++

Compiler

gcc 7.3.0

Options
Warnings
Boost 1.69.0
C++17
no pedantic

Author

anonymous

over 6 years ago

has_nested_type.hpp

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.69.0/gcc-7.3.0/include -std=c++17
prog.cc:16:21: error: 'struct Protected::type' is protected within this context
                 << (has_nested_type_v<Protected> ? "detected" : "not detected")
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cc:6:14: note: declared protected here
       struct type{};
              ^~~~
prog.cc:19:21: error: 'struct Private::type' is private within this context
                 << (has_nested_type_v<Private> ? "detected" : "not detected")
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cc:11:14: note: declared private here
       struct type{};
              ^~~~
Exit Code:
1