Skip to content

Commit

Permalink
doc: reorder snippet sections alphabetically, use an ellipsis.
Browse files Browse the repository at this point in the history
  • Loading branch information
mosra committed Jun 15, 2021
1 parent 460f90e commit 51ee6e9
Showing 1 changed file with 16 additions and 26 deletions.
42 changes: 16 additions & 26 deletions doc/snippets/Containers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,22 @@ auto b = Containers::optional<std::string>('a', 'b');
/* [optional-inplace] */
}

{
/* [pointer] */
std::string* ptr = DOXYGEN_IGNORE({});

auto a = Containers::Pointer<std::string>{ptr};
auto b = Containers::pointer(ptr);
/* [pointer] */
}

{
/* [pointer-inplace] */
auto a = Containers::Pointer<std::string>{InPlaceInit, 'a', 'b'};
auto b = Containers::pointer<std::string>('a', 'b');
/* [pointer-inplace] */
}

#ifdef __linux__
/* [ScopeGuard-usage] */
{
Expand Down Expand Up @@ -1055,32 +1071,6 @@ Containers::StridedArrayView3D<std::uint8_t> rgb =
static_cast<void>(rgb);
}

#ifdef __clang__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wuninitialized"
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
{
/* [pointer] */
std::string* ptr;

auto a = Containers::Pointer<std::string>{ptr};
auto b = Containers::pointer(ptr);
/* [pointer] */
}
#if defined(__clang__) || defined(__GNUC__)
#pragma GCC diagnostic pop
#endif

{
/* [pointer-inplace] */
auto a = Containers::Pointer<std::string>{InPlaceInit, 'a', 'b'};
auto b = Containers::pointer<std::string>('a', 'b');
/* [pointer-inplace] */
}

{
/* [StringView-usage-literal] */
using namespace Containers::Literals;
Expand Down

0 comments on commit 51ee6e9

Please sign in to comment.