You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a wonderful library I am looking for. However, when I am trying to compile the example code from the master branch, It fails with an error message:
5-map.cc:44:1: error: body of ‘constexpr’ function ‘constexpr const char* describe(Channel)’ not a return-statement
44 | }
| ^
make: *** [Makefile:20: 5-map.exe] Error 1
The g++ version I am using:
g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Thanks!
-Yuxin
The text was updated successfully, but these errors were encountered:
@aantron
I found the reason why the case failed to compile. link
C++11's constexpr functions support exactly one return statement. The restriction was lifted in C++14.
So it doesn't work if only remove the final return line from describe in C++11.
Hi,
This is a wonderful library I am looking for. However, when I am trying to compile the example code from the master branch, It fails with an error message:
The g++ version I am using:
Thanks!
-Yuxin
The text was updated successfully, but these errors were encountered: