Changes between Initial Version and Version 1 of Ticket #11572
- Timestamp:
- Aug 24, 2015, 12:17:42 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #11572 – Description
initial v1 1 1 The following code, as deque_convert.cpp, which uses the generic boost::fusion::convert to convert to a boost::fusion::deque, fails with a compiler error: 2 2 3 #include <boost/detail/lightweight_test.hpp> 4 #include <boost/fusion/include/deque.hpp> 5 #include <boost/fusion/include/make_deque.hpp> 6 #include <boost/fusion/include/make_vector.hpp> 7 #include <boost/fusion/sequence/intrinsic/at_c.hpp> 8 #include <boost/fusion/sequence/convert.hpp> 9 #include <string> 3 {{{ 10 4 11 int main() 12 { 13 boost::fusion::deque<int, std::string> t = boost::fusion::convert<boost::fusion::deque_tag>(boost::fusion::make_vector(123, "Hola!!!")); // Line 13 14 // boost::fusion::deque<int, std::string> t = boost::fusion::convert<boost::fusion::deque_tag>(boost::fusion::make_deque(123, "Hola!!!")); // Line 14 15 BOOST_TEST(boost::fusion::at_c<0>(t) == 123); 16 BOOST_TEST(boost::fusion::at_c<1>(t) == "Hola!!!"); 17 return boost::report_errors(); 18 } 5 #include <boost/detail/lightweight_test.hpp> 6 #include <boost/fusion/include/deque.hpp> 7 #include <boost/fusion/include/make_deque.hpp> 8 #include <boost/fusion/include/make_vector.hpp> 9 #include <boost/fusion/sequence/intrinsic/at_c.hpp> 10 #include <boost/fusion/sequence/convert.hpp> 11 #include <string> 19 12 13 int main() 14 { 15 boost::fusion::deque<int, std::string> t = boost::fusion::convert<boost::fusion::deque_tag>(boost::fusion::make_vector(123, "Hola!!!")); // Line 13 16 // boost::fusion::deque<int, std::string> t = boost::fusion::convert<boost::fusion::deque_tag>(boost::fusion::make_deque(123, "Hola!!!")); // Line 14 17 BOOST_TEST(boost::fusion::at_c<0>(t) == 123); 18 BOOST_TEST(boost::fusion::at_c<1>(t) == "Hola!!!"); 19 return boost::report_errors(); 20 } 21 22 }}} 23 20 24 Compiling with mingw-64/gcc-5.1 on Windows: 25 26 {{{ 21 27 22 28 "C:/Utilities/mingw-w64/i686-5.1.0-posix-dwarf-rt_v4-rev0/mingw32/bin/g++" -ftemplate-depth-128 -Wno-unused-local-typedefs -ftrack-macro-expansion=0 -O0 -fno-inline -Wall -g -march=i686 -m32 -DBOOST_ALL_NO_LIB=1 -I"..\..\.." -c -o "..\..\..\bin.v2\libs\fusion\test\deque_convert.test\gcc-mingw-5.1\debug\sequence\deque_convert.o" "sequence\deque_convert.cpp" … … 32 38 return gen::call(seq); 33 39 40 }}} 41 34 42 Compiling with msvc-14.0 on Windows: 43 44 {{{ 35 45 36 46 file ..\..\..\bin.v2\libs\fusion\test\deque_convert.test\msvc-14.0\debug\threading-multi\sequence\deque_convert.obj.rsp … … 71 81 ] 72 82 83 }}} 84 85 73 86 Compiling with clang-3.8: 87 88 {{{ 74 89 75 90 "C:/Programming/VersionControl/bninja_installed_clang/bin/clang++" -c -x c++ -D__MINGW_FORCE_SYS_INTRINS -Wno-unused-local-typedef -Wno-dll-attribute-on-redeclaration -O0 -g -fno-inline -Wall -g -march=i686 -m32 -DBOOST_ALL_NO_LIB=1 -I"..\..\.." -o "..\..\..\bin.v2\libs\fusion\test\deque_convert.test\clang-linux-3.8\debug\sequence\deque_convert.obj" "sequence\deque_convert.cpp" … … 88 103 boost::fusion::deque<int, std::string> t = boost::fusion::convert<boost::fusion::deque_tag>(boost::fusion::make_vector(123, "Hola!!!")); // Line 13 89 104 90 Commenting out line 13 and uncommenting line 14 produces the same error. I do not believe any conversion to a boost::fusion::deque, using the generic boost::fusion::convert functionality, will work. 105 }}} 106 107 In the source file commenting out line 13 and uncommenting line 14 produces the same error. I do not believe any conversion to a boost::fusion::deque, using the generic boost::fusion::convert functionality, will work. 91 108 92 109 I discovered this bug testing out a PR for the iterator library where a suggested change has been implemented so that the zip_iterator in the iterator library can use fusion sequences, and through the fusion adapter, std::tuple, as the tuple type for the tupleiterator of a zip_iterator. … … 98 115 99 116 100 101 102 103 117