Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error upon make in utils/data-reader #11

Open
Kominaru opened this issue Apr 26, 2024 · 1 comment
Open

Compilation error upon make in utils/data-reader #11

Kominaru opened this issue Apr 26, 2024 · 1 comment

Comments

@Kominaru
Copy link

The title is self-explanatory. I'm unable to trace back the source of the issue (e.g. compiler version) and the documentation isn't very exhaustive in this regard so I thought I'd ask here. I would appreciate any help.

Compiler trace (excerpt):

>> komi@DESKTOP:(...)/utils/data-reader$ make

main.cpp:44:43: error: template argument 2 is invalid
   44 | bool contains(string key, map<string, byte> mymap) {
      |                                           ^
main.cpp:44:43: error: template argument 4 is invalid
main.cpp:44:43: error: template argument 2 is invalid
main.cpp:44:43: error: template argument 4 is invalid
main.cpp:44:43: error: template argument 2 is invalid
main.cpp:44:43: error: template argument 4 is invalid
main.cpp:44:27: error: invalid template-id
   44 | bool contains(string key, map<string, byte> mymap) {
      |                           ^~~
main.cpp:44:39: error: reference to ‘byte’ is ambiguous
   44 | bool contains(string key, map<string, byte> mymap) {
      |                                       ^~~~
main.cpp:44:27: error: class template placeholder ‘std::map’ not permitted in this context
   44 | bool contains(string key, map<string, byte> mymap) {
      |                           ^~~
main.cpp: In function ‘bool contains(...)’:
main.cpp:45:25: error: template argument 2 is invalid
   45 |         map<string, byte>::iterator it = mymap.find(key);
      |                         ^
( ... )

Some environment information:

  • Ubuntu 22.04.4 LTS
  • g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
  • BoostLib Version: 1.74.0.3ubuntu7

I have had no problems running make and executing the example for the sequential CPU fast version. Only having issues with the data reader.

Cheers

@itsoulos
Copy link

Just replace the byte name with ubyte for example and the compilation will succeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants