Changes between Initial Version and Version 1 of Ticket #11572


Ignore:
Timestamp:
Aug 24, 2015, 12:17:42 AM (7 years ago)
Author:
Edward Diener
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11572 – Description

    initial v1  
    11The 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:
    22
    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{{{
    104
    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>
    1912
     13int main()
     14{
     15boost::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
     17BOOST_TEST(boost::fusion::at_c<0>(t) == 123);
     18BOOST_TEST(boost::fusion::at_c<1>(t) == "Hola!!!");
     19return boost::report_errors();
     20}
     21
     22}}}
     23   
    2024Compiling with mingw-64/gcc-5.1 on Windows:
     25
     26{{{
    2127
    2228    "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"
     
    3238                     return gen::call(seq);
    3339
     40}}}
     41
    3442Compiling with msvc-14.0 on Windows:
     43
     44{{{
    3545
    3646file ..\..\..\bin.v2\libs\fusion\test\deque_convert.test\msvc-14.0\debug\threading-multi\sequence\deque_convert.obj.rsp
     
    7181        ]
    7282
     83}}}
     84
     85
    7386Compiling with clang-3.8:
     87
     88{{{
    7489
    7590  "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"
     
    88103    boost::fusion::deque<int, std::string> t = boost::fusion::convert<boost::fusion::deque_tag>(boost::fusion::make_vector(123, "Hola!!!")); // Line 13
    89104
    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
     107In 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.
    91108
    92109I 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.
     
    98115
    99116
    100 
    101 
    102 
    103117