Comments (12)
~$ g++ --version
g++ (GCC) 7.2.1 20171128
Copyright (C) 2017 Free Software Foundation, Inc.
static_assert ( bool_constexpr , message ) | | (since C++11)
static_assert ( bool_constexpr ) | | (since C++17)
Probably a syntax error as C++17 has message
optional, and your g++
version doesn't have C++17
support.
A PR is welcome to add a message
in there to enable your compiler support 👍
from fast-dat-parser.
Update from g++ 7.2.0 to g++ 7.3.0 Now the Errors are:
g++ -pedantic -std=c++1z -W -Wall -Wcast-qual -Wconversion -Werror -Wextra -Wwrite-strings -O3 -Iinclude -MMD -MP -c src/parser.cpp -o src/parser.o
In file included from include/hash.hpp:8:0,
from include/bitcoin.hpp:9,
from src/parser.cpp:9:
include/ranger.hpp: In instantiation of ‘void __ranger::Range::put(E) [with E = __ranger::Range<const char*>; I = unsigned char*]’:
include/bitcoin.hpp:251:44: required from ‘void putASM(R&, const R&) [with R = __ranger::Range<unsigned char*>]’
src/statistics.hpp:110:11: required from ‘void dumpASM::operator()(const Block&) [with Block = BlockBase<__ranger::Range<unsigned char*> >]’
src/parser.cpp:145:1: required from here
include/ranger.hpp:86:32: error: no matching function for call to ‘put(__ranger::Range<unsigned char*>&, __ranger::Range<const char*>&)’
void put (E e) { __ranger::put(this, e); }
~~~~~~~~~~~~~^~~~~~~~~~
include/ranger.hpp:23:6: note: candidate: void __ranger::put(R&, typename R::value_type) [with R = __ranger::Range<unsigned char>; typename R::value_type = unsigned char]
void put (R& r, typename R::value_type e) {
^~~
include/ranger.hpp:23:6: note: no known conversion for argument 2 from ‘__ranger::Range<const char*>’ to ‘__ranger::Range<unsigned char*>::value_type {aka unsigned char}’
include/ranger.hpp:36:6: note: candidate: template<class R, class E, class V> void __ranger::put(R&, E)
void put (R& r, E e) {
^~~
include/ranger.hpp:36:6: note: template argument deduction/substitution failed:
include/ranger.hpp:31:2: error: no type named ‘type’ in ‘struct std::enable_if<false, __ranger::Range<const char*> >’
typename V = typename std::enable_if<
^~~~~~~~
In file included from include/bitcoin.hpp:9:0,
from src/parser.cpp:9:
include/hash.hpp:58:7: error: ‘auto {anonymous}::toHexBE(const uint256_t&)’ defined but not used [-Werror=unused-function]
auto toHexBE (const uint256_t& hash) {
^~~~~~~
cc1plus: all warnings being treated as errors
Makefile:28: recipe for target 'src/parser.o' failed
make: *** [src/parser.o] Error 1
from fast-dat-parser.
Can reproduce... will fix
from fast-dat-parser.
What version g++
?
from fast-dat-parser.
g++ --version
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609
:)
from fast-dat-parser.
Resolved in master, see #12, and dcousens/ranger@aa3b771
from fast-dat-parser.
g++ -pedantic -std=c++1z -W -Wall -Wcast-qual -Wconversion -Werror -Wextra -Wwrite-strings -O3 -Iinclude -MMD -MP -c src/parser.cpp -o src/parser.o
In file included from include/hash.hpp:8:0,
from include/bitcoin.hpp:9,
from src/parser.cpp:9:
include/ranger.hpp: In instantiation of ‘void __ranger::Range::put(E) [with E = __ranger::Range<const char*>; I = unsigned char*]’:
include/bitcoin.hpp:251:44: required from ‘void putASM(R&, const R&) [with R = __ranger::Range<unsigned char*>]’
src/statistics.hpp:110:11: required from ‘void dumpASM::operator()(const Block&) [with Block = BlockBase<__ranger::Range<unsigned char*> >]’
src/parser.cpp:145:1: required from here
include/ranger.hpp:86:32: error: no matching function for call to ‘put(__ranger::Range<unsigned char*>&, __ranger::Range<const char*>&)’
void put (E e) { __ranger::put(this, e); }
~~~~~~~~~~~~~^~~~~~~~~~
include/ranger.hpp:23:6: note: candidate: void __ranger::put(R&, typename R::value_type) [with R = __ranger::Range<unsigned char>; typename R::value_type = unsigned char]
void put (R& r, typename R::value_type e) {
^~~
include/ranger.hpp:23:6: note: no known conversion for argument 2 from ‘__ranger::Range<const char*>’ to ‘__ranger::Range<unsigned char*>::value_type {aka unsigned char}’
include/ranger.hpp:36:6: note: candidate: template<class R, class E, class V> void __ranger::put(R&, E)
void put (R& r, E e) {
^~~
include/ranger.hpp:36:6: note: template argument deduction/substitution failed:
include/ranger.hpp:31:2: error: no type named ‘type’ in ‘struct std::enable_if<false, __ranger::Range<const char*> >’
typename V = typename std::enable_if<
^~~~~~~~
In file included from include/bitcoin.hpp:9:0,
from src/parser.cpp:9:
include/hash.hpp:58:7: error: ‘auto {anonymous}::toHexBE(const uint256_t&)’ defined but not used [-Werror=unused-function]
auto toHexBE (const uint256_t& hash) {
^~~~~~~
cc1plus: all warnings being treated as errors
Makefile:28: recipe for target 'src/parser.o' failed
make: *** [src/parser.o] Error 1
from fast-dat-parser.
i got the error, too . gcc 7.3
from fast-dat-parser.
@efvhi you are building from master?
from fast-dat-parser.
Great cant wait for it :)
from fast-dat-parser.
On ubuntu 16.04 with g++ 5.4.0, try this
diff --git a/Makefile b/Makefile
index ebe06fe..3e5f32a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
CXX=g++
-CFLAGS=-pedantic -std=c++1z -W -Wall -Wcast-qual -Wconversion -Werror -Wextra -Wwrite-strings
+CFLAGS=-pedantic -std=c++1z -W -Wall -Wcast-qual -Wconversion -Wextra -Wwrite-strings
#OFLAGS=-O3 -ggdb3
OFLAGS=-O3
LFLAGS=-lcrypto
diff --git a/include/ranger.hpp b/include/ranger.hpp
index fceceb8..f71df28 100644
--- a/include/ranger.hpp
+++ b/include/ranger.hpp
@@ -149,7 +149,8 @@ auto ptr_range (R& r) {
return __ranger::Range<pointer>(r.data(), r.data() + r.size());
}
-inline auto zstr_range (const char* z) {
+inline auto zstr_range (const char* z_) {
+ auto z = reinterpret_cast<const unsigned char*>(z_);
using pointer = decltype(z);
auto r = z;
diff --git a/src/parser.cpp b/src/parser.cpp
index 48af06b..dbe4c7c 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -15,6 +15,11 @@
#include "statistics.hpp"
// #include "leveldb.hpp"
+#ifndef __cpp_if_constexpr
+template <typename Block>
+constexpr decltype(dumpUnspents<Block>::BLANK_TXIN) dumpUnspents<Block>::BLANK_TXIN;
+#endif
+
using backing_vector_t = std::vector<uint8_t>;
using block_t = decltype(Block(ptr_range(backing_vector_t()), ptr_range(backing_vector_t())));
using thread_function_t = std::function<void(void)>;
from fast-dat-parser.
Duplicate of #15 - which is fixed
from fast-dat-parser.
Related Issues (20)
- assert((txOutsIter != this->txOuts.end()) && !(hash < txOutsIter->first)); HOT 1
- Compilation code source errors in Ubuntu 16.04 HOT 2
- centos make error HOT 9
- How can i use it to get list of all vout and vin ? HOT 3
- Makefile:28: recipe for target 'src/parser.o' failed
- ubuntu16 gcc7.3 make error HOT 5
- Ubuntu 18.04.1 LTS - Make failed HOT 3
- 32bit build errors HOT 1
- README slightly out of date
- How to read parsed data? HOT 2
- g++ 8.3 compilation fail HOT 2
- Transform filter doesn't seem to work on Bitcoin Core v0.18.1
- binsort - avoid constant re-alloc HOT 1
- Usage instructions HOT 2
- could I use this to export my blk*.dat file to a human readable form? HOT 2
- transforms/leveldb: Use *_ID hashes over *_HASH HOT 1
- Re-testing HOT 1
- Nothing on stdout HOT 3
- Dump all scripts with unspent balances HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fast-dat-parser.