Git Product home page Git Product logo

crc32-11's People

Contributors

eternalharvest avatar

Watchers

 avatar  avatar  avatar

crc32-11's Issues

Bug: compile error with gcc

Error "template instantiation depth exceeds maximum of 300" is reported with g++ compiler.
I'm not sure why clang compiler not occurs this error though.

How to reproduce

user@localhost:~work/crc32-11$ mkdir build
user@localhost:~work/crc32-11$ cd build
user@localhost:~work/crc32-11/build$ cmake ..
user@localhost:~work/crc32-11/build$ make
[ 50%] Building CXX object CMakeFiles/crc32++11.dir/src/main.cpp.o
In file included from /home/takuya/work/crc32-11/src/main.cpp:28:0:
/home/takuya/work/crc32-11/src/crc32.hpp: In instantiation of 'constexpr const uint32_t crc32_table_generator<79764919u>::crc32_table_elem<111u, 1u>::value':
/home/takuya/work/crc32-11/src/crc32.hpp:52:41:   recursively required from 'constexpr const uint32_t crc32_table_generator<79764919u>::crc32_table_elem<111u, 7u>::value'
/home/takuya/work/crc32-11/src/crc32.hpp:62:25:   recursively required from 'constexpr const auto crc32_table_generator<79764919u>::array_impl<255ul>::value'
/home/takuya/work/crc32-11/src/crc32.hpp:62:25:   required from 'struct crc32_table_generator<79764919u>::array_impl<255ul>'
/home/takuya/work/crc32-11/src/crc32.hpp:72:45:   required from 'constexpr const std::array<unsigned int, 256ul> crc32_table_generator<79764919u>::value'
/home/takuya/work/crc32-11/src/crc32.hpp:83:63:   required from 'uint32_t crc32(uint32_t, iterator_t, iterator_t) [with unsigned int poly = 79764919u; iterator_t = std::istream_iterator<unsigned char>; uint32_t = unsigned int]'
/home/takuya/work/crc32-11/src/main.cpp:39:56:   required from here
/home/takuya/work/crc32-11/src/crc32.hpp:52:41: fatal error: template instantiation depth exceeds maximum of 300 (use -ftemplate-depth= to increase the maximum)
    (crc32_table_elem<index, N-1>::value << 1) ^ denominator<uint32_t, carry>::value;
                                         ^
compilation terminated.
CMakeFiles/crc32++11.dir/build.make:62: recipe for target 'CMakeFiles/crc32++11.dir/src/main.cpp.o' failed
make[2]: *** [CMakeFiles/crc32++11.dir/src/main.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/crc32++11.dir/all' failed
make[1]: *** [CMakeFiles/crc32++11.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Not a standard CRC32

Nice library. The only big issue is that can't generate standard CRC32.

IEEE8023_CRC32_POLYNOMIAL is standard, however the generated table is incorrect for it.

The first few entries must be:
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535

Your lib generates:
0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b, 0x1a864db2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.