1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-27 22:32:15 +00:00
Atmosphere/libraries/libvapours/include/vapours/util
Léo Lam 496adb0018
Minor header fixes to reduce parsing issues with Clang (#1700)
* Work around Clang's incomplete C++20 support for omitting typename

* vapours: fix Clang error about missing return in constexpr function

* stratosphere: fix call to non-constexpr strlen in constexpr function

strlen being constexpr is a non-compliant GCC extension; Clang
explicitly rejects it: https://reviews.llvm.org/D23692

* stratosphere: add a bunch of missing override specifiers

* stratosphere: work around Clang consteval bug

Minimal example: https://godbolt.org/z/MoM64v93M

The issue seems to be that Clang does not consider f(x) to be a
constant expression if x comes from a template argument that isn't
a non-type auto template argument (???)

We can work around this by relaxing GetMessageHeaderForCheck (by using
constexpr instead of consteval). This produces no functional changes
because the result of GetMessageHeaderForCheck() is assigned to a
constexpr variable, so the result is guaranteed to be computed
at compile-time.

* stratosphere: fix missing require clauses in definitions

GCC not requiring the require clauses to be repeated for member
definitions is actually a compiler bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96830

Clang rejects declarations with missing require clauses.

* Fix ALWAYS_INLINE_LAMBDA and parameter list relative order

While GCC doesn't seem to care about the position of the always_inline
attribute relative to the parameter list, Clang is very picky
and requires the attribute to appear after the parameter list
(and before a trailing return type)

* stratosphere: fix static constexpr member variable with incomplete type

GCC accepts this for some reason (because of the lambda?) but Clang
correctly rejects this.
2021-11-06 18:19:34 -07:00
..
arch kern: optimize timespan -> tick codegen, improve .text layout 2021-10-24 01:16:24 -07:00
impl ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
util_aligned_buffer.hpp exo/vapours: refactor member variables to m_ over this-> 2021-10-09 15:40:06 -07:00
util_alignment.hpp kern: update scheduler for 13.0.0 change, fix some ctz/clz bugs 2021-10-19 01:20:28 -07:00
util_atomic.hpp kern/util: use custom atomics wrapper to substantially improve codegen 2021-10-19 15:24:15 -07:00
util_bitflagset.hpp exo/vapours: refactor member variables to m_ over this-> 2021-10-09 15:40:06 -07:00
util_bitpack.hpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
util_bitset.hpp kern: update scheduler for 13.0.0 change, fix some ctz/clz bugs 2021-10-19 01:20:28 -07:00
util_bitutil.hpp crypto: implement md5, which now used by sprof 2021-10-25 23:15:50 -07:00
util_bounded_map.hpp exo/vapours: refactor member variables to m_ over this-> 2021-10-09 15:40:06 -07:00
util_character_encoding.hpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
util_endian.hpp crypto: implement md5, which now used by sprof 2021-10-25 23:15:50 -07:00
util_enum.hpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
util_exchange.hpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
util_fixed_map.hpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
util_fixed_set.hpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
util_fixed_tree.hpp exo/vapours: refactor member variables to m_ over this-> 2021-10-09 15:40:06 -07:00
util_format_string.hpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
util_fourcc.hpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
util_in_place.hpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
util_int_util.hpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
util_intrusive_list.hpp constexpr: resign ourselves to gcc dropping void -> T support 2021-10-17 02:39:16 -07:00
util_intrusive_red_black_tree.hpp Minor header fixes to reduce parsing issues with Clang (#1700) 2021-11-06 18:19:34 -07:00
util_mutex_utils.hpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
util_optional.hpp Minor header fixes to reduce parsing issues with Clang (#1700) 2021-11-06 18:19:34 -07:00
util_overlap.hpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
util_parent_of_member.hpp ams: improve offsetof style consistency 2021-10-18 00:17:13 -07:00
util_range.hpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
util_scope_guard.hpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
util_size.hpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
util_specialization_of.hpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
util_string_util.hpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
util_string_view.hpp git subrepo pull (merge) libraries 2021-11-03 23:59:17 -07:00
util_timer.hpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
util_tinymt.hpp kern: avoid constexpr init for many objects (avoids unnecessary memory clear) (#1668) 2021-10-23 15:25:20 -07:00
util_type_traits.hpp util: add trait/macro for is_constexpr_constructible 2021-10-25 17:31:14 -07:00
util_typed_storage.hpp constexpr: resign ourselves to gcc dropping void -> T support 2021-10-17 02:39:16 -07:00
util_utf8_string_util.hpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
util_uuid.hpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
util_variadic.hpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00