Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 3 years ago

Language

C++

Compiler

gcc 12.1.0

Options
Warnings
Optimization
Boost 1.79.0
C++2a
-pedantic

Author

anonymous

almost 3 years ago

Header.h

$ g++ prog.cc -Wall -Wextra -O2 -march=native -I/opt/wandbox/boost-1.79.0-gcc-12.1.0/include -std=c++2a -pedantic
prog.cc: In function 'int main()':
prog.cc:10:8: warning: variable 'result' set but not used [-Wunused-but-set-variable]
   10 |   auto result = temp::noexcept_stoi(input);
      |        ^~~~~~
In file included from prog.cc:3:
Header.h: In instantiation of 'std::optional<int> temp::noexcept_stoi(const T&, std::size_t*, int) [with T = std::__cxx11::basic_string<wchar_t>; std::size_t = long unsigned int]':
prog.cc:5:117:   required from here
Header.h:9:48: warning: unused parameter 'str' [-Wunused-parameter]
    9 |     std::optional<int> noexcept_stoi( const T& str, std::size_t* pos = nullptr, int base = 10)
      |                                       ~~~~~~~~~^~~
Header.h:9:66: warning: unused parameter 'pos' [-Wunused-parameter]
    9 |     std::optional<int> noexcept_stoi( const T& str, std::size_t* pos = nullptr, int base = 10)
      |                                                     ~~~~~~~~~~~~~^~~~~~~~~~~~~
Header.h:9:85: warning: unused parameter 'base' [-Wunused-parameter]
    9 |     std::optional<int> noexcept_stoi( const T& str, std::size_t* pos = nullptr, int base = 10)
      |                                                                                 ~~~~^~~~~~~~~
Header.h: In instantiation of 'std::optional<int> temp::noexcept_stoi(const T&, std::size_t*, int) [with T = std::__cxx11::basic_string<char>; std::size_t = long unsigned int]':
prog.cc:6:115:   required from here
Header.h:9:48: warning: unused parameter 'str' [-Wunused-parameter]
    9 |     std::optional<int> noexcept_stoi( const T& str, std::size_t* pos = nullptr, int base = 10)
      |                                       ~~~~~~~~~^~~
Header.h:9:66: warning: unused parameter 'pos' [-Wunused-parameter]
    9 |     std::optional<int> noexcept_stoi( const T& str, std::size_t* pos = nullptr, int base = 10)
      |                                                     ~~~~~~~~~~~~~^~~~~~~~~~~~~
Header.h:9:85: warning: unused parameter 'base' [-Wunused-parameter]
    9 |     std::optional<int> noexcept_stoi( const T& str, std::size_t* pos = nullptr, int base = 10)
      |                                                                                 ~~~~^~~~~~~~~
Exit Code:
0