Quantcast
Channel: cpplinq Releases Rss Feed
Viewing all articles
Browse latest Browse all 20

Updated Release: cpplinq-20140919 (sep 19, 2014)

$
0
0
LINQ for C++ (cpplinq) is an extensible C++11 library of higher-order functions for range manipulation. cpplinq draws inspiration from LINQ for C#.

This release includes just the source code.

What's new in this release:
  • Fixed an issue with wrong return type for first (). Thanks to Sepidar for finding this bug.
  • Fixed max () for float-like types. Thanks to tjohnson937 for finding this bug.
  • Fixed select () so that it only evaluates the predicate once per value. Thanks to tjohnson937 for providing the solution to this issue.
  • Minor tweaks (whitespaces, code coverage and so on)

Thanks to:
  • tjohnson937
  • Sepidar

Tested on:
  • VS2013 Update 3
  • g++ 4.8.2 (with -std=c++11)
  • clang3.4 (with -std=c++11)

This is a sample on how to use cpplinq:
#include "cpplinq.hpp"int computes_a_sum ()
{
    usingnamespace cpplinq;    
    int ints[] = {3,1,4,1,5,9,2,6,5,4};

    // Computes the sum of all even numbers in the sequence abovereturn 
            from_array (ints)
        >>  where ([](int i) {return i%2 ==0;})     // Keep only even numbers>>  sum ()                                  // Sum remaining numbers
        ;
}

See documentation for more details.

Viewing all articles
Browse latest Browse all 20

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>