bish: fix build with gcc>=11

This commit is contained in:
Duncaen 2022-10-08 15:47:18 +02:00
parent 45d0bd57b1
commit 84c7ff399d
No known key found for this signature in database
GPG Key ID: 335C1D17EC3D6E35
2 changed files with 16 additions and 1 deletions

View File

@ -0,0 +1,11 @@
--- a/src/Util.h
+++ b/src/Util.h
@@ -16,7 +16,7 @@
// Convert int to string
inline std::string as_string(int i) {
- return dynamic_cast<std::ostringstream &>((std::ostringstream() << i )).str();
+ return std::to_string(i);
}
inline std::string as_string(const std::string &s) {

View File

@ -3,13 +3,17 @@ pkgname=bish
version=0.1 version=0.1
revision=2 revision=2
build_style=gnu-makefile build_style=gnu-makefile
short_desc="A language that compiles to Bash" short_desc="Language that compiles to Bash"
maintainer="Diogo Leal <diogo@diogoleal.com>" maintainer="Diogo Leal <diogo@diogoleal.com>"
license="MIT" license="MIT"
homepage="https://github.com/tdenniston/bish" homepage="https://github.com/tdenniston/bish"
distfiles="https://github.com/tdenniston/bish/archive/v${version}.tar.gz" distfiles="https://github.com/tdenniston/bish/archive/v${version}.tar.gz"
checksum=796d1efcbc9e8c7ea604881860aa8d857aad089c4eeb766283c21c210687942b checksum=796d1efcbc9e8c7ea604881860aa8d857aad089c4eeb766283c21c210687942b
do_check() {
./bish -r tests/tests.bish
}
do_install() { do_install() {
vbin bish vbin bish
vlicense LICENSE vlicense LICENSE