Skip to content

Commit 5fb1497

Browse files
committed
[libc++] Add default copy ctor to "__chrono/exception.h"
After PR#90394, "__chrono/exception.h" will trigger "deprecated-copy-with-user-provided-dtor" warning on Windows x64 runtime testing with ToT Clang. This patch addresses this issue by explicitly adding those default copy ctors.
1 parent 148417b commit 5fb1497

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libcxx/include/__chrono/exception.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ class nonexistent_local_time : public runtime_error {
4848
"creating an nonexistent_local_time from a local_info that is not non-existent");
4949
}
5050

51+
nonexistent_local_time(const nonexistent_local_time&) = default;
52+
nonexistent_local_time& operator=(const nonexistent_local_time&) = default;
53+
5154
_LIBCPP_AVAILABILITY_TZDB _LIBCPP_EXPORTED_FROM_ABI ~nonexistent_local_time() override; // exported as key function
5255

5356
private:
@@ -89,6 +92,9 @@ class ambiguous_local_time : public runtime_error {
8992
"creating an ambiguous_local_time from a local_info that is not ambiguous");
9093
}
9194

95+
ambiguous_local_time(const ambiguous_local_time&) = default;
96+
ambiguous_local_time& operator=(const ambiguous_local_time&) = default;
97+
9298
_LIBCPP_AVAILABILITY_TZDB _LIBCPP_EXPORTED_FROM_ABI ~ambiguous_local_time() override; // exported as key function
9399

94100
private:

0 commit comments

Comments
 (0)