bolero-MURAKAMI / Sprout

C++11/14 constexpr based Containers, Algorithms, Random numbers, Parsing, Ray tracing, Synthesizer, and others.
http://bolero-murakami.github.io/Sprout/
Boost Software License 1.0
876 stars 48 forks source link

Failed to build Sprout on x86 due to error C2923 and C2955 with MSVC #93

Open spacelg opened 5 years ago

spacelg commented 5 years ago

We failed to build Sprout on x86 due to error C2923 and C2955 with MSVC. This issue can be reproduced on latest commit ea06f92. It seems that 'I' is not declared in has_sprout_get.hpp. Could you please help take a look at this? Thank you!

Environment: Windows + VS2017

Steps to Reproduce: 1.git clone https://github.com/bolero-MURAKAMI/Sprout.git D:\Sprout\src 2.Open a VS 2017 x86 command prompt and browse to D:\Sprout 3.cd src 4.cl /std:c++latest /EHsc /I. /constexpr:steps100000000 testspr\sprout.cpp

log_x86_build.log

Actual result: sprout.cpp .\sprout/tuple/tuple/has_sprout_get.hpp(48): error C2923: 'sprout::tuples::detail::has_sproutget': 'I' is not a valid template type argument for parameter 'Base' .\sprout/tuple/tuple/has_sprout_get.hpp(46): note: see declaration of 'I' .\sprout/tuple/tuple/has_sprout_get.hpp(49): note: see reference to class template instantiation 'sprout::tuples::has_sprout_get<T,I>' being compiled D:\Sprout\src\testspr../libs/bitset/test/bitset.cpp(21): note: see reference to class template instantiation 'sprout::bitset<40>' being compiled D:\Sprout\src\testspr../libs/string/test/string.cpp(23): note: see reference to class template instantiation 'sprout::basic_string<char,8,sprout::char_traits>' being compiled with [ T=char ] .\sprout/string/string.hpp(121): note: see reference to class template instantiation 'sprout::char_traits' being compiled with [ T=char ] .\sprout/string/string.hpp(218): note: see reference to class template instantiation 'sprout::detail::basic_string_impl<T,10,Traits>' being compiled with [ T=char, Traits=sprout::char_traits ] D:\Sprout\src\testspr../libs/string/test/string.cpp(22): note: see reference to class template instantiation 'sprout::basic_string<char,10,sprout::char_traits>' being compiled with [ T=char ] .\sprout/functional/hash/hash.hpp(34): note: see reference to class template instantiation 'sprout::hash' being compiled with [ T=sprout::array<int,10> ] D:\Sprout\src\testspr../libs/array/test/array.cpp(175): note: see reference to class template instantiation 'sprout::hash<const sprout::array<int,10>>' being compiled .\sprout/algorithm/detail/min.hpp(29): note: see reference to class template instantiation 'sprout::less' being compiled with [ T=int ] .\sprout/algorithm/lexicographical_compare.hpp(50): note: see reference to function template instantiation 'const T &sprout::min(const T &,const T &)' being compiled with [ T=int ] .\sprout/algorithm/lexicographical_compare.hpp(98): note: see reference to function template instantiation 'bool sprout::detail::lexicographical_compare<InputIterator1,InputIterator2,Compare>(RandomAccessIterator1,RandomAccessIterator1,RandomAccessIterator2,RandomAccessIterator2,Compare,std::random_access_iterator_tag *)' being compiled with [ InputIterator1=sprout::index_iterator<const sprout::array<int,10> &,true,sprout::subscript>, InputIterator2=sprout::index_iterator<const sprout::array<int,10> &,true,sprout::subscript>, Compare=sprout::less, RandomAccessIterator1=sprout::index_iterator<const sprout::array<int,10> &,true,sprout::subscript>, RandomAccessIterator2=sprout::index_iterator<const sprout::array<int,10> &,true,sprout::subscript> ] .\sprout/algorithm/lexicographical_compare.hpp(111): note: see reference to function template instantiation 'bool sprout::lexicographical_compare<InputIterator1,InputIterator2,sprout::less>(InputIterator1,InputIterator1,InputIterator2,InputIterator2,Compare)' being compiled with [ InputIterator1=sprout::index_iterator<const sprout::array<int,10> &,true,sprout::subscript>, InputIterator2=sprout::index_iterator<const sprout::array<int,10> &,true,sprout::subscript>, Compare=sprout::less ] .\sprout/array/comparison.hpp(39): note: see reference to function template instantiation 'bool sprout::lexicographical_compare<sprout::index_iterator<const sprout::array<int,10> &,true,sprout::subscript>,sprout::index_iterator<const sprout::array<int,10> &,true,sprout::subscript>>(InputIterator1,InputIterator1,InputIterator2,InputIterator2)' being compiled with [ InputIterator1=sprout::index_iterator<const sprout::array<int,10> &,true,sprout::subscript>, InputIterator2=sprout::index_iterator<const sprout::array<int,10> &,true,sprout::subscript> ] D:\Sprout\src\testspr../libs/array/test/array.cpp(143): note: see reference to function template instantiation 'bool sprout::operator <<int,10>(const sprout::array<int,10> &,const sprout::array<int,10> &)' being compiled .\sprout/index_tuple/integer_n.hpp(27): note: see reference to class template instantiation 'sprout::integer_sequence<T,0,0,0,0,0,0,0,0,0,0>' being compiled with [ T=ptrdiff_t ] .\sprout/index_tuple/integer_n.hpp(60): note: see reference to class template instantiation 'sprout::detail::integer_n_next_even<T,sprout::integer_sequence<T,0,0,0,0,0>>' being compiled with [ T=ptrdiff_t ] .\sprout/index_tuple/enable_make_indexes.hpp(19): note: see reference to class template instantiation 'sprout::detail::integer_n_impl<T,0,10,void>' being compiled with [ T=ptrdiff_t ] .\sprout/index_tuple/integer_n.hpp(77): note: see reference to class template instantiation 'sprout::enable_make_indexes<sprout::detail::integer_n_impl<T,0,10,void>>' being compiled with [ T=ptrdiff_t ] .\sprout/index_tuple/index_n.hpp(23): note: see reference to class template instantiation 'sprout::detail::integer_n<ptrdiff_t,0,10>' being compiled .\sprout/index_tuple/index_n.hpp(23): note: see reference to alias template instantiation 'sprout::integer_n<ptrdiff_t,0,10>' being compiled .\sprout/array/array.hpp(96): note: see reference to alias template instantiation 'sprout::index_n<0,10>' being compiled .\sprout/array/array.hpp(95): note: while compiling class template member function 'sprout::array<int,10> sprout::array<int,10>::fill(const int &) const' .\sprout/array/array.hpp(102): note: see reference to function template instantiation 'sprout::array<int,10> sprout::array<int,10>::fill(const int &) const' being compiled D:\Sprout\src\testspr../libs/array/test/array.cpp(20): note: see reference to class template instantiation 'sprout::array<int,10>' being compiled .\sprout/tuple/tuple/has_sprout_get.hpp(49): error C2955: 'sprout::tuples::detail::has_sprout_get': use of class template requires template argument list .\sprout/tuple/tuple/has_sprout_get.hpp(37): note: see declaration of 'sprout::tuples::detail::has_sprout_get' [command took 91 seconds]

spacelg commented 5 years ago

Hi All, Someone is looking at this issue?

bolero-MURAKAMI commented 5 years ago

Hi spacelg, Thanks for the report. I fixed it now. [9c037a70456a46f549798f2a83c19cebcc72e809]