Skip to content

Port from C++11 to C++17 #2585

@Lestropie

Description

@Lestropie

Believe the primary relevance was #2297 (QT6)?
But there are other features that we would likely want to change across the code base in the process of transitioning compilation.
Many features can just be made use of whenever a contributor feels like it, but others we might want to adopt across the board.
The goal of this issue is to list & discuss those (so feel free to add to the list).

  • Make use of filesystem library
    This may result in reduction or deprecation of core/file/path.h and/or core/file/utils.h
  • Nested namespaces
    This I'd personally like to see adopted across the code base in order to remove unnecessary indentation.
  • std::byte in place of anywhere that a uint8_t is used as a set of bitwise flags
    Datatype comes to mind, but there are likely others.
    Edit: In addition to bitwise flags, there's also the question of pointers to binary data. On looking around a bit, one suggestion seems to be to use std::byte* for pointers to completely unstructured / untyped binary data, whereas if the implication is that the underlying data will have some type but the handling code is type-agnostic, continue to use void*. But we could equally use std::byte* for any type-agnostic pointers to binary memory. Open to thoughts.
    Edit: For anything for which the size is known at compile time, std::bitset may be better.
  • This may also be the right context in which to address Back-end: Remove all char* / char** usages #2111
    Edit: C++17 also has std::string_view; this should perhaps be used in instances of interfacing with some code dependency that uses C-style strings, but I'd advocate removing C-style strings across the board where we have the control to do so.
  • Remove custom MR::vector<>, revert to std::vector<>
  • Remove custom make_shared<>() and make_unique<>()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions