X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=CONTRIBUTING.adoc;h=945f3984d368406d3a9d96fa86dffd12f640eb4f;hp=431a16691418bed00a20c174d2982b394b605125;hb=HEAD;hpb=a19a1879a2d960421d8d372a3abf8b35791d1b9b diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index 431a1669..171fcb14 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -1728,6 +1728,11 @@ When possible, prefer using this over the C{nbsp}logging API. One important benefit is that this API uses {fmt} to format the logging message instead of `vsnprintf()`. +`make-span.hpp`:: + The function template `bt2c::makeSpan()` which is an alternative to + https://en.cppreference.com/w/cpp/language/class_template_argument_deduction[CTAD] + (a {cpp}17 feature). + `prio-heap.hpp`:: The `bt2c::PrioHeap` class template: an efficient heap data structure. @@ -1777,7 +1782,7 @@ Also provides conversion to `bt2c::Uuid`. Everything under the `bt2s` namespace has its equivalent under the `std` namespace, but in {cpp} versions we don't yet have access to, namely: -`make_unique.hpp`:: +`make-unique.hpp`:: `bt2s::make_unique()`, a drop-in replacement of `std::make_unique()` ({cpp}14). @@ -1814,6 +1819,11 @@ the `bt2s` namespace, instead of using this directly. + IMPORTANT: Use the symbols of `src/cpp-common/bt2s/span.hpp`, under the `bt2s` namespace, instead of using this directly. ++ +TIP: `src/cpp-common/bt2c/make-span.hpp` offers `bt2c::makeSpan()` which +is an alternative to +https://en.cppreference.com/w/cpp/language/class_template_argument_deduction[CTAD] +(a {cpp}17 feature). `string-view-lite`:: https://github.com/martinmoene/string-view-lite[string_view lite]. @@ -1821,6 +1831,9 @@ IMPORTANT: Use the symbols of `src/cpp-common/bt2s/span.hpp`, under the IMPORTANT: Use the symbols of `src/cpp-common/bt2s/string-view.hpp`, under the `bt2s` namespace, instead of using this directly. +`wise_enum`:: + https://github.com/quicknir/wise_enum[wise_enum]. + === Automake/Libtool requirements To add a {cpp} source file to a part of the project, use the `.cpp` @@ -1897,10 +1910,10 @@ $ FORMATTER='my-clang-format-15 -i' ./tools/format-cpp.sh * Use camel case with an uppercase first letter for: ** Types: `Pistachio`, `NutManager`. ** Template parameters: `PlanetT`, `TotalSize`. +** Enumerators: `Type::SignedInt`, `Scope::Function`. * Use snake case with uppercase letters for: ** Definition/macro names: `MARK_AS_UNUSED()`, `SOME_FEATURE_EXISTS`. -** Enumerators: `Type::SIGNED_INT`, `Scope::FUNCTION`. * Use only lowercase letters and digits for namespaces: `mylib`, `bt2`. @@ -2222,9 +2235,9 @@ public: enum class Gender { - MALE, - FEMALE, - OTHER, + Male, + Female, + Other, }; explicit Baby() = default;