C++ library/feature similar to from/where/select in C#? RRS feed

  • Question

  • Is there a library or compiler feature or other thing I can use (in the latest version of Visual C++ 2019 and using the latest C++ standards) that does something similar to the from/where/select (and related keywords) in C#?

    Plain C++, no .NET or C++/CLI or anything like that.

    Thursday, June 25, 2020 12:29 AM


All replies

  • See one of the libraries – “cpplinq”:

    • https://mariusbancila.ro/blog/tag/cpplinq/
    • https://www.codeproject.com/articles/498267/cpplinq-an-introduction
    Thursday, June 25, 2020 3:42 AM
  • cpplinq would be perfect if not for the fact that it is licensed under the MS-PL and I can't use MS-PL licensed code because I am already using (and absolutely need) GPL licensed code and the MS-PL and GPL are incompatible.

    Thursday, June 25, 2020 5:53 AM
  • Hello,

    how about this library: https://github.com/ReactiveX/RxCpp  ("CC By 4.0" license)

    Regards, Guido

    Thursday, June 25, 2020 9:39 AM
  • Or have a look at this: https://github.com/k06a/boolinq

    Regards, Guido

    • Marked as answer by jonwil Thursday, June 25, 2020 11:20 AM
    Thursday, June 25, 2020 9:43 AM
  • Boolinq is exactly what I need by the look of it.

    MIT license, single header file, easy to use, well documented and easy to use.

    Thursday, June 25, 2020 11:20 AM