mirror of
https://github.com/github/codeql.git
synced 2026-03-23 07:56:54 +01:00
12 lines
202 B
C++
12 lines
202 B
C++
template <typename T>
|
|
struct Box {
|
|
Box(T&& apple) noexcept(__has_nothrow_copy(T)) {
|
|
T banana = apple;
|
|
}
|
|
};
|
|
|
|
template <typename T>
|
|
inline Box<T> box(T&& carrot) {
|
|
return Box<T>((T&&)carrot);
|
|
}
|