mirror of
https://github.com/github/codeql.git
synced 2026-04-14 19:44:03 +02: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);
|
|
}
|