Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 4 years ago

Language

C++

Compiler

clang HEAD 13.0.0 (https://github.com/llvm/llvm-project.git 7310403e3cdf8a436f94770e1a1498db05d2d091)

Options
Warnings
Boost 1.73.0
C++2b(GNU)
no pedantic

Author

anonymous

about 4 years ago

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/clang-head/include -std=gnu++2b
prog.cc:18:42: warning: unused parameter 'p' [-Wunused-parameter]
constexpr bool HasMakeNullFunction(void* p = nullptr)
                                         ^
prog.cc:26:24: error: call to 'HasMakeNullFunction' is ambiguous
    constexpr bool b = HasMakeNullFunction<Dog>(); // True
                       ^~~~~~~~~~~~~~~~~~~~~~~~
prog.cc:12:16: note: candidate function [with T = Dog]
constexpr auto HasMakeNullFunction() -> decltype(std::declval<T>().makeNull(), bool())
               ^
prog.cc:18:16: note: candidate function [with T = Dog]
constexpr bool HasMakeNullFunction(void* p = nullptr)
               ^
1 warning and 1 error generated.
Exit Code:
1