aboutsummaryrefslogtreecommitdiff
path: root/gcc/obstack-utils.h
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2023-06-23 16:37:16 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-16 18:49:34 +0100
commitc3d5d8bee12e5e18d89db6126fbdd0edde110bf7 (patch)
tree6c720f933df2e0ae2c421531ad6030e0897c8096 /gcc/obstack-utils.h
parent1678cdd3aac83c3e255e4395c12a9d7dff350a70 (diff)
downloadgcc-c3d5d8bee12e5e18d89db6126fbdd0edde110bf7.zip
gcc-c3d5d8bee12e5e18d89db6126fbdd0edde110bf7.tar.gz
gcc-c3d5d8bee12e5e18d89db6126fbdd0edde110bf7.tar.bz2
gccrs: optional: Import tl's optional type
This is directly adapted from https://github.com/TartanLlama/optional. This class is tested for C++11 and on GCC 4.8, which is our target mimimum GCC version. This optional class provides multiple advantages over our existing implementation of Optional<T>: - Easier API (no static constructors) - Better method chaining (and_then, map...) - Harsher semantics (no assign-through on Optional<T&>) Over the std::optional type present in C++'s standard library, this type offers: - Optional references without going through std::reference_wrapper - Better method chaining For these reasons, I am in favor of importing it directly rather than adapt C++14's std::optional type to work with C++11 and GCC 4.8. gcc/rust/ChangeLog: * util/optional.h: New file.
Diffstat (limited to 'gcc/obstack-utils.h')
0 files changed, 0 insertions, 0 deletions