isis-group / isis

The ISIS project aims to provide a framework to access a large variety of image processing libraries written in different programming languages and environments.
GNU General Public License v3.0
17 stars 14 forks source link

imageTest doesn't compile #31

Closed lydiatgit closed 12 years ago

lydiatgit commented 12 years ago

on MAC OSX 10.7 (Lion) normal procedure to get isis, cmake set BUILD_TEST compiler gcc-4.2 or llvmgcc doesn't matter error while compiling:

/Users/Lydi/Development/isis/lib/Core/DataStorage/../CoreUtils/types.hpp: In instantiation of ‘isis::util::checkType’: /Users/Lydi/Development/isis/lib/Core/DataStorage/../CoreUtils/property.hpp:105: instantiated from ‘bool isis::util::PropertyValue::operator==(const T&) const [with T = long unsigned int]’ /usr/local/include/boost/test/test_tools.hpp:536: instantiated from ‘boost::test_tools::predicate_result boost::test_tools::tt_detail::equal_impl(const Left&, const Right&) [with Left = isis::util::PropertyValue, Right = long unsigned int]’ /usr/local/include/boost/test/test_tools.hpp:560: instantiated from ‘boost::test_tools::predicate_result boost::test_tools::tt_detail::equal_impl_frwd::callimpl(const Left&, const Right&, mpl::false_) const [with Left = isis::util::PropertyValue, Right = long unsigned int]’ /usr/local/include/boost/test/test_tools.hpp:575: instantiated from ‘boost::test_tools::predicate_result boost::test_tools::tt_detail::equal_impl_frwd::operator()(const Left&, const Right&) const [with Left = isis::util::PropertyValue, Right = long unsigned int]’ /usr/local/include/boost/test/test_tools.hpp:523: instantiated from ‘bool boost::test_tools::tt_detail::check_frwd(Pred, const boost::unit_test::lazy_ostream&, boost::test_tools::const_string, size_t, boost::test_tools::tt_detail::tool_level, boost::test_tools::tt_detail::checktype, const Arg0&, const char, const Arg1&, const char_) [with Pred = boost::test_tools::tt_detail::equal_impl_frwd, Arg0 = isis::util::PropertyValue, Arg1 = size_t]’ /Users/Lydi/Development/isis/tests/DataStorage/imageTest.cpp:197: instantiated from here /Users/Lydi/Development/isis/lib/Core/DataStorage/../CoreUtils/types.hpp:73: error: no matching function for call to ‘assertionfailed(mpl::failed\ (isis::util::checkType::TYPE_IS_NOT_KNOWN::**)(long unsigned int))’

DerOrfa commented 12 years ago

Sorry my fault...

Reason is that in that loop i is of type size_t. And so the type system tries to compare the property against a size_t-value. Which is done by converting the property into size_t. And as size_t is not part of the type system (intentionally) this is not allowed - which leads to a compile error.

Some compilers on some platforms do not cleanly separate types. So size_t is often mistaken for a uint32_t/uint64_t (which are part of the type system), and thus is wrongly accepted.

fixed with 000d7dc942abd25f96684caacb49809cf2aba326