Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime selection library only supports std::list as a collection #391

Open
doczir opened this issue Sep 24, 2015 · 2 comments
Open

Runtime selection library only supports std::list as a collection #391

doczir opened this issue Sep 24, 2015 · 2 comments
Labels
Milestone

Comments

@doczir
Copy link
Contributor

doczir commented Sep 24, 2015

The current implementation of the runtime selection library in it's current state only supports std::list and the intermediate selections from chains in the following operations:
select_any, select_any_where, select_many, select_many_where

This causes compilation errors when a .one() is called on a set.

@doczir
Copy link
Contributor Author

doczir commented Sep 24, 2015

A possible solution would be using C++11 (in case of select_any, but applicable to the others):

template<template<class...> class Container, class Value, class... Args>
inline Value select_any(const Container<Value, Args...>& ct) {
    return (ct.begin()!=ct.end())?*ct.begin():nullptr;
}

@abelhegedus abelhegedus modified the milestones: Sept-2015, Nov 2015, Oct 2015 Sep 28, 2015
@abelhegedus abelhegedus removed the EATF label Sep 28, 2015
@abelhegedus abelhegedus modified the milestones: Oct 2015, Nov 2015 Oct 30, 2015
@abelhegedus abelhegedus changed the title Runtime selection library only supports std::list as a collection. Runtime selection library only supports std::list as a collection Nov 16, 2015
@abelhegedus abelhegedus modified the milestones: Future, Nov 2015 Nov 16, 2015
@abelhegedus
Copy link
Member

List and set are supported, other implementations are not needed at the moment, so I put this in the Future milestone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants