Language
C++
Compiler
gcc HEAD 10.0.0 20190605 (experimental)
Options
Warnings
Boost 1.70.0
C++2a(GNU)
-pedantic
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/gcc-head/include -std=gnu++2a -pedantic
Test 1
Test 2
Exit Code:
0
Author
anonymous
almost 6 years ago
C++
gcc HEAD 10.0.0 20190605 (experimental)
Author
anonymous
almost 6 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/gcc-head/include -std=gnu++2a -pedantic
prog.cc: In function 'int main()':
prog.cc:33:10: warning: ignoring return value of 'std::enable_if_t<(! is_void_v<T>), T> Wrapper<FuncT>::operator()(ARG&& ...) [with ARG = {}; T = int; FuncT = main()::<lambda()>; std::enable_if_t<(! is_void_v<T>), T> = int]', declared with attribute nodiscard [-Wunused-result]
33 | test2(); // <-- Warning issued here
| ~~~~~^~
prog.cc:20:63: note: declared here
20 | [[nodiscard]] std::enable_if_t<!std::is_void_v<T>, T> operator()(ARG&&... args) {
| ^~~~~~~~
Test 1
Test 2