Error when compiling Hana according to "How to contribute"
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 225
- PR merge metrics
- No merged PRs in 30d
Description
I've followed steps 1, 2, and 4 (not 3) from [How to contribute](https://github.com/boostorg/hana/blob/master/CONTRIBUTING.md), but I get this error:
```
Scanning dependencies of target test.string.zero
[ 2%] Building CXX object test/CMakeFiles/test.string.zero.dir/string/zero.cpp.o
In file included from /home/enrico/hana/include/boost/hana/string.hpp:13,
from /home/enrico/hana/test/string/zero.cpp:7:
/home/enrico/hana/include/boost/hana/fwd/string.hpp:268:24: error: ISO C++ did not adopt string literal operator templates taking an argument pack of characters [-Werror=pedantic]
268 | constexpr auto operator"" _s();
| ^~~~~~~~
In file included from /home/enrico/hana/test/string/zero.cpp:7:
/home/enrico/hana/include/boost/hana/string.hpp:117:24: error: ISO C++ did not adopt string literal operator templates taking an argument pack of characters [-Werror=pedantic]
117 | constexpr auto operator"" _s() {
| ^~~~~~~~
cc1plus: note: unrecognized command-line option ‘-Wno-self-assign-overloaded’ may have been intended to silence earlier diagnostics
cc1plus: all warnings being treated as errors
make[3]: *** [test/CMakeFiles/test.string.zero.dir/build.make:82: test/CMakeFiles/test.string.zero.dir/string/zero.cpp.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:13422: test/CMakeFiles/test.string.zero.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1622: CMakeFiles/check.dir/rule] Error 2
make: *** [Makefile:337: check] Error 2
```
My compiler is
```
$ g++ --version
g++ (GCC) 10.2.0
Copyright (C) 2020 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.
```
which looks ok, based on [General notes on compiler support](https://github.com/boostorg/hana/wiki/General-notes-on-compiler-support).
Contributor guide
Research direction
Start with CONTRIBUTING.md and reproduce the `make check` failure using the reported GCC 10.2.0 environment. Read include/boost/hana/fwd/string.hpp, include/boost/hana/string.hpp, and test/string/zero.cpp alongside the compiler-support notes. Done means the documented contribution build completes without the reported errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100