On Thursday 04 April 2002 5:21 pm, Lars Gullik Bjønnes wrote: > Angus Leeming <[EMAIL PROTECTED]> writes: > | I have been unable to compile lyxsum.C since version 1.18 (we're now on > | version 1.25). This is what I get when I try and do so. It seems such an > | irritating error --- why should my compiler barf if a template parameter > | is not used? Can someone explain it to me? > > Can you create a small test file that use boost::crc and post that one > and the errors to the boost list?
This was posted to the Boost users list recently by someone attempting to get it working with VC++ 7. #include<iostream> #include "boost/crc.hpp" int main(void) { const unsigned char DATA[] = { 1, 2, 3, 4, 5 }; boost::crc_32_type crc; crc.reset(); crc.process_bytes(DATA, sizeof(DATA) / sizeof(*DATA)); std::cout << crc.checksum() << std::endl; return(true); } > Or I could post it to the boost list for you... That'd be good. > But we really should test it with an uptodate version of boost > first... If I compile it with either LyX's copy of the boost libraries or with version 1.26 I get the same sort of messages I posted earlier. This is with DEC cxx v6.1. Angus Eg cxx -Isrc/cheaders -Iboostv126 -std strict_ansi -o crc_trial crc_trial.C cxx: Error: boostv126/boost/crc.hpp, line 77: constant "Bits" is not used in declaring the parameter types of function template "boost::crc" template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, -----------------------^ cxx: Error: boostv126/boost/crc.hpp, line 77: constant "TruncPoly" is not used in declaring the parameter types of function template "boost::crc" template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, -------------------------------------------------^ cxx: Error: boostv126/boost/crc.hpp, line 78: constant "InitRem" is not used in declaring the parameter types of function template "boost::crc" BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, -------------------------------^ cxx: Error: boostv126/boost/crc.hpp, line 78: constant "FinalXor" is not used in declaring the parameter types of function template "boost::crc" BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, ------------------------------------------------------------^ cxx: Error: boostv126/boost/crc.hpp, line 79: constant "ReflectIn" is not used in declaring the parameter types of function template "boost::crc" bool ReflectIn, bool ReflectRem > ----------------^ cxx: Error: boostv126/boost/crc.hpp, line 79: constant "ReflectRem" is not used in declaring the parameter types of function template "boost::crc" bool ReflectIn, bool ReflectRem > --------------------------------^ cxx: Error: boostv126/boost/crc.hpp, line 84: constant "Bits" is not used in declaring the parameter types of function template "boost::augmented_crc" template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly > -----------------------^ cxx: Error: boostv126/boost/crc.hpp, line 84: constant "TruncPoly" is not used in declaring the parameter types of function template "boost::augmented_crc" template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly > -------------------------------------------------^ cxx: Error: boostv126/boost/crc.hpp, line 89: constant "Bits" is not used in declaring the parameter types of function template "boost::augmented_crc<Bits,TruncPoly>(const void *, std::size_t)" template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly > -----------------------^ cxx: Error: boostv126/boost/crc.hpp, line 89: constant "TruncPoly" is not used in declaring the parameter types of function template "boost::augmented_crc<Bits,TruncPoly>(const void *, std::size_t)" template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly > -------------------------------------------------^ cxx: Error: boostv126/boost/crc.hpp, line 283: expression must have integral or enum type BOOST_STATIC_CONSTANT( least, high_bit = (least( 1u ) << ( Bits --------^ cxx: Error: boostv126/boost/crc.hpp, line 285: expression must have integral or enum type BOOST_STATIC_CONSTANT( fast, high_bit_fast = (fast( 1u ) << ( Bits --------^ cxx: Error: boostv126/boost/crc.hpp, line 343: expression must have integral or enum type BOOST_STATIC_CONSTANT( least, sig_bits = (~( ~(least( 0u )) << Bits )) ); --------^ cxx: Error: boostv126/boost/crc.hpp, line 977: constant "Bits" is not used in declaring the parameter types of function template "boost::crc" template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, -----------------------^ cxx: Error: boostv126/boost/crc.hpp, line 977: constant "TruncPoly" is not used in declaring the parameter types of function template "boost::crc" template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly, -------------------------------------------------^ cxx: Error: boostv126/boost/crc.hpp, line 978: constant "InitRem" is not used in declaring the parameter types of function template "boost::crc" BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, -------------------------------^ cxx: Error: boostv126/boost/crc.hpp, line 978: constant "FinalXor" is not used in declaring the parameter types of function template "boost::crc" BOOST_CRC_PARM_TYPE InitRem, BOOST_CRC_PARM_TYPE FinalXor, ------------------------------------------------------------^ cxx: Error: boostv126/boost/crc.hpp, line 979: constant "ReflectIn" is not used in declaring the parameter types of function template "boost::crc" bool ReflectIn, bool ReflectRem > ----------------^ cxx: Error: boostv126/boost/crc.hpp, line 979: constant "ReflectRem" is not used in declaring the parameter types of function template "boost::crc" bool ReflectIn, bool ReflectRem > --------------------------------^ cxx: Error: boostv126/boost/crc.hpp, line 997: constant "Bits" is not used in declaring the parameter types of function template "boost::augmented_crc<Bits,TruncPoly>(const void *, std::size_t, boost::uint_t<(int)Bits>::fast)" template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly > -----------------------^ cxx: Error: boostv126/boost/crc.hpp, line 997: constant "TruncPoly" is not used in declaring the parameter types of function template "boost::augmented_crc<Bits,TruncPoly>(const void *, std::size_t, boost::uint_t<(int)Bits>::fast)" template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly > -------------------------------------------------^ cxx: Error: boostv126/boost/crc.hpp, line 1030: constant "Bits" is not used in declaring the parameter types of function template "boost::augmented_crc<Bits,TruncPoly>(const void *, std::size_t)" template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly > -----------------------^ cxx: Error: boostv126/boost/crc.hpp, line 1030: constant "TruncPoly" is not used in declaring the parameter types of function template "boost::augmented_crc<Bits,TruncPoly>(const void *, std::size_t)" template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly > -------------------------------------------------^ cxx: Info: 23 errors detected in the compilation of "crc_trial.C".