mirror of
https://gitee.com/openharmony/third_party_rust_cxx
synced 2024-11-23 15:19:44 +00:00
Format with clangfmt
This commit is contained in:
parent
a3d92bf992
commit
c2279000a9
@ -132,8 +132,7 @@ public:
|
|||||||
T *operator->() noexcept { return this->ptr; }
|
T *operator->() noexcept { return this->ptr; }
|
||||||
T &operator*() noexcept { return *this->ptr; }
|
T &operator*() noexcept { return *this->ptr; }
|
||||||
|
|
||||||
template <typename... Fields>
|
template <typename... Fields> static Box in_place(Fields &&... fields) {
|
||||||
static Box in_place(Fields&&... fields) {
|
|
||||||
Box box;
|
Box box;
|
||||||
box.uninit();
|
box.uninit();
|
||||||
::new (box.ptr) T{std::forward<Fields>(fields)...};
|
::new (box.ptr) T{std::forward<Fields>(fields)...};
|
||||||
|
@ -5,8 +5,7 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
template <typename Exception>
|
template <typename Exception> static void panic [[noreturn]] (const char *msg) {
|
||||||
[[noreturn]] static void panic(const char *msg) {
|
|
||||||
#if defined(RUST_CXX_NO_EXCEPTIONS)
|
#if defined(RUST_CXX_NO_EXCEPTIONS)
|
||||||
std::cerr << "Error: " << msg << ". Aborting." << std::endl;
|
std::cerr << "Error: " << msg << ". Aborting." << std::endl;
|
||||||
std::terminate();
|
std::terminate();
|
||||||
|
Loading…
Reference in New Issue
Block a user