[all-commits] [llvm/llvm-project] cdf745: [libc++][utility] Test `[[nodiscard]] std::exchang...

Hristo Hristov via All-commits all-commits at lists.llvm.org
Wed May 6 11:57:24 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cdf745a9f290fce16ab68499ff0f8850284a7491
      https://github.com/llvm/llvm-project/commit/cdf745a9f290fce16ab68499ff0f8850284a7491
  Author: Hristo Hristov <hghristov.rmm at gmail.com>
  Date:   2026-05-06 (Wed, 06 May 2026)

  Changed paths:
    M libcxx/include/__utility/exchange.h
    M libcxx/test/libcxx/utilities/utility/nodiscard.verify.cpp

  Log Message:
  -----------
  [libc++][utility] Test `[[nodiscard]] std::exchange` (#195807)

1. `[[nodiscard]]` was applied in https://llvm.org/PR187953
2. Also use `[[__nodiscard__]]` in pre-C++17 code.

Towards https://github.com/llvm/llvm-project/issues/172124

References:
-
https://libcxx.llvm.org/CodingGuidelines.html#apply-nodiscard-where-relevant
- https://wg21.link/utility.exchange

Co-authored-by: Hristo Hristov <zingam at outlook.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list