You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Ben Kietzman (Jira)" <ji...@apache.org> on 2021/05/20 20:55:00 UTC

[jira] [Updated] (ARROW-12816) [C++] C++14 laundry list

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

Ben Kietzman updated ARROW-12816:
---------------------------------
    Description: 
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 {{VisitInts(offset_width, offset_bytes, [&](auto* offsets) { /*mutate offsets*/ })}}
- 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

  was:
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 {{ VisitInts(offset_width, offset_bytes, [&](auto* offsets) { /*mutate offsets*/ }) }}
- 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


> [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 {{VisitInts(offset_width, offset_bytes, [&](auto* offsets) { /*mutate offsets*/ })}}
> - 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.3.4#803005)