
Mat Marcus wrote:
This library has been tested with icc7 and with gcc-3.1.1 (and various other gcc-3.x.y versions) on Solaris and Linux.
I tried compilation with GCC 3.4.0. I found out the following: (while compiling isort.cpp & tw_hamming.cpp) ../fcpp/list.hpp:665: error: dependent-name`boost::fcpp::impl::Cache<T>::CvtFxn' is parsed as a non-type, but instantiation yields a type ../fcpp/list.hpp:665: note: say `typename boost::fcpp::impl::Cache<T>::CvtFxn' if a type is meant ../fcpp/list.hpp:479: error: dependent-name`boost::fcpp::impl::Cache<T>::CvtFxn' is parsed as a non-type, but instantiation yields a type ../fcpp/list.hpp:479: note: say `typename boost::fcpp::impl::Cache<T>::CvtFxn' if a type is meant Fixed as suggested by the compiler. (while compiling monad3.cpp) monad3.cpp:123: error: no type named `of' in `struct OutputMonad<Output>' monad3.cpp:123: error: non-template `of' used as template monad3.cpp:123: error: (use `OutputMonad<Output>::template of' to indicate that it is a template) Fixed as suggested by the compiler (also on line 124). (while compiling monad3.cpp) ../fcpp/operator.hpp:164: error: `boost::fcpp::<unnamed>::make_pair' is not a function, /usr/lib/gcc/i686-pc-cygwin/3.5.0/include/c++/bits/stl_pair.h:142: error: conflict with `template<class _T1, class _T2> std::pair<_T1, _T2> std::make_pair(_T1, _T2)' monad3.cpp:125: error: in call to `make_pair' There is a name injection issue here, where a non-function and a function with the same name are both injected within the current namespace. I don't think it's a bug in the compiler, and the fix is to say std::make_pair. The same happens in line 90 and line 118. (while compiling monad3.cpp) monad3.cpp:82: error: no type named `second_type' in `struct OutputMonad<std::string>' This is a template shadow parameter issue, related to the fact that OutputMonad<> defines an inner type called "M", but a template member functions uses M as template parameter as well: struct A { typedef int M; template <class M> void foo(void) { M m; // which M is this? } }; I know the C++ committe is discussing this issue at this moment. The argument would be that "M" names the typedef because it's "more stable" than the template parameter (which could get renamed in an out-of-class definition). See also http://gcc.gnu.org/PR13967 for a detailed discussion. It's possible that GCC will emit a warning about this borderline case of shadowing, one day. This is worked around easily, by renaming the innest template parameter, in line 107 and 110, and all its subsequent uses. (while compiling monad_3.cpp) ../fcpp/operator.hpp:164: error: `boost::fcpp::<unnamed>::make_pair' is not a function, /usr/lib/gcc/i686-pc-cygwin/3.5.0/include/c++/bits/stl_pair.h:142: error: conflict with `template<class _T1, class _T2> std::pair<_T1, _T2> std::make_pair(_T1, _T2)' monad_3.cpp:81: error: in call to `make_pair' Same as the bug in monad3.cpp (mind the underscore in the filename). After compilation, I tried to execute the tests: * rep_min has some problems, because it enters an infinite loop: After repl_min3, sum is 144 Count is now 190 After repl_min3, sum is 144 Count is now 190 After repl_min3, sum is 144 Count is now 190 [etc]. I didn't analyze the failure though. * A few tests are interactive, I don't think this is correct. They should be either recategorized as examples, or modified to be fully automatic. I should also notice that the zip file could be arranged already with the boost directory structure (boost/fc/* for includes, and libs/fc/{examples,tests}/* for the tests and examples). That's all for now. -- Giovanni Bajo