[ 
https://issues.apache.org/jira/browse/ARROW-12816?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Antoine Pitrou closed ARROW-12816.
----------------------------------
    Resolution: Duplicate

> [C++] C++14 laundry list
> ------------------------
>
>                 Key: ARROW-12816
>                 URL: https://issues.apache.org/jira/browse/ARROW-12816
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>            Reporter: Ben Kietzman
>            Priority: Major
>
> Improvements to make/be aware of once C++14 is available:
> - Ensure that lambda closure members are moved into where ever 
> possible/appropriate. We have a lot of local variables whose only function is 
> getting copied into a closure, including some demotions to shared_ptr since 
> move only types can't be closed over in c++11
> - visitor pattern can be used more fluidly with template lambdas, for example 
> we could have a utility like
> {code:cpp}
> VisitInts(offset_width, offset_bytes, [&](auto* offsets) { /*mutate offsets*/ 
> })
> {code}
> to replace a switch statement like
> {code:cpp}
> switch (offset_width) {
> case 8:
>   /* mutate offsets<int8_t> */
>   break;
> case 16:
>   /* mutate offsets<int16_t> */
>   break;
> // ...
> }
> {code}
> - deduced return type with {{auto}}:
> {code:cpp}
> template <typename Container>
> auto GetBeginAndEnd(const Container& cont) {
>   return std::make_pair(cont.begin(), cont.end());
> }
> {code}
> - constexpr switch, for use in type traits functions
> - std::enable_if_t
> - std::quoted is available for escaping strings
> - std::make_unique
> - standard {{[[deprecated]]}} attribute
> - temporal literals such as ""s, ""ns, ...
> - binary literals with place markers such as 0b1100_1111



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to