Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 4 years ago

Language

C++

Compiler

gcc 11.1.0

Options
Warnings
Don't Use Boost
C++11
-pedantic

Author

anonymous

about 4 years ago

$ g++ prog.cc -Wall -Wextra -std=c++11 -pedantic
prog.cc:11:17: error: declaration of 'Key E' shadows template parameter
   11 | BDictionary(Key E)
      |             ~~~~^
prog.cc:8:25: note: template parameter 'E' declared here
    8 | template <typename Key, typename E>
      |                         ^~~~~~~~
prog.cc:16:18: error: declaration of 'Key E' shadows template parameter
   16 | ~BDictionary(Key E)
      |              ~~~~^
prog.cc:8:25: note: template parameter 'E' declared here
    8 | template <typename Key, typename E>
      |                         ^~~~~~~~
prog.cc:16:1: error: destructors may not have parameters
   16 | ~BDictionary(Key E)
      | ^
prog.cc: In constructor 'BDictionary<Key, E>::BDictionary(Key)':
prog.cc:11:17: error: declaration of 'Key E' shadows template parameter
   11 | BDictionary(Key E)
      |             ~~~~^
prog.cc:8:25: note: template parameter 'E' declared here
    8 | template <typename Key, typename E>
      |                         ^~~~~~~~
prog.cc: In instantiation of 'BDictionary<Key, E>::BDictionary(Key) [with Key = int; E = int]':
prog.cc:23:54:   required from here
prog.cc:11:17: warning: unused parameter 'E' [-Wunused-parameter]
   11 | BDictionary(Key E)
      |             ~~~~^
Exit Code:
1