SERVING THE QUANTITATIVE FINANCE COMMUNITY

 
User avatar
Cuchulainn
Posts: 61589
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

C++ 2017

December 3rd, 2015, 3:49 pm

I need a memory-independent indexible container type, e.g. std vector and std arraySo, the code below will not work I reckon (allocator..)
Last edited by Cuchulainn on December 2nd, 2015, 11:00 pm, edited 1 time in total.
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget
 
User avatar
Polter
Topic Author
Posts: 2526
Joined: April 29th, 2008, 4:55 pm

C++ 2017

December 3rd, 2015, 4:42 pm

Yeah, views are one idea -- and something like this may end up getting standardized as `span` (which is a non-owning view over a C-style array, `std::array`, or `std::vector`).Note that `span` was previously called `array_view` -- and is to arrays as `string_view` (and the proposed `string_span`) is to strings.To give some context, the latter is based on the Boost.StringRef implementation: http://www.boost.org/doc/libs/master/li ... ef.htmlFor now you can get Guidelines Support Library (GSL), which includes the aforementioned types (it's also fairly minimalistic -- in fact, being an easy to audit, minimally-imposing dependency has been one of the specific design goals).- Microsoft's implementation: https://github.com/Microsoft/GSL- C++98 port: https://github.com/martinmoene/gsl-liteTo my understanding `span` lives in its own header: https://github.com/Microsoft/GSL/blob/m ... ude/span.h
Last edited by Polter on December 2nd, 2015, 11:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 61589
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

C++ 2017

April 3rd, 2016, 7:10 pm

The list of featuresNo ConceptsModulesBoot asio
http://www.datasimfinancial.com
http://www.datasim.nl

Every Time We Teach a Child Something, We Keep Him from Inventing It Himself
Jean Piaget
ABOUT WILMOTT

PW by JB

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...


Twitter LinkedIn Instagram

JOBS BOARD

JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...


GZIP: On