Skip to content

Suggestion: add a lazy_vector<T> example #97

Description

@greole

First, thanks for creating yap! I am trying to extend the lazy_vector example to create a lazy_vector<T> version. This would need another template parameter for the lazy_vector_expr
struct, like

template <boost::yap::expr_kind Kind, typename Tuple, typename I>
struct lazy_vector_expr
{
    static const boost::yap::expr_kind kind = Kind;

    Tuple elements;

    // Note that this does not return an expression; it is greedily evaluated.
    I operator[] (std::size_t n) const;
};

However, this doesn't work with the provided macros BOOST_YAP_USER_BINARY_OPERATOR. Does it mean i should implement a different version of BOOST_YAP_USER_BINARY_OPERATOR? What is the best way to achieve this?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions