boostorg/fusion

List initialization problem

Opened this issue · 0 comments

    boost::fusion::vector<int>{ 123 }; // ok
    boost::fusion::vector<int>{ { 123 } }; // fail
    boost::optional<int>{ 123 }; // ok
    boost::optional<int>{ { 123 } }; // ok
    boost::fusion::vector<boost::optional<int>>{ 123 }; // ok
    boost::fusion::vector<boost::optional<int>>{ { 123 } }; // fail
    boost::fusion::vector<boost::optional<int>>{ { { 123 } } }; // fail

    boost::fusion::vector<std::string>{ "hello" }; // ok
    boost::fusion::vector<std::string>{ { "hello" } }; // fail
    boost::optional<std::string>{ "hello" }; // ok
    boost::optional<std::string>{ { "hello" } }; // ok
    boost::fusion::vector<boost::optional<std::string>>{ "hello" }; // fail
    boost::fusion::vector<boost::optional<std::string>>{ { "hello" } }; // fail
    boost::fusion::vector<boost::optional<std::string>>{ { { "hello" } } }; // fail