| 1 |
//===----------------------------------------------------------------------===// |
| 2 |
// |
| 3 |
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 |
// See https://llvm.org/LICENSE.txt for license information. |
| 5 |
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 |
// |
| 7 |
//===----------------------------------------------------------------------===// |
| 8 |
|
| 9 |
#ifndef SUPPORT_MAKE_IMPLICIT_H |
| 10 |
#define SUPPORT_MAKE_IMPLICIT_H |
| 11 |
|
| 12 |
// "make_implicit<Tp>(Args&&... args)" is a function to construct 'Tp' |
| 13 |
// from 'Args...' using implicit construction. |
| 14 |
|
| 15 |
#include <utility> |
| 16 |
|
| 17 |
template <class T, class... Args> |
| 18 |
T make_implicit(Args&&... args) { |
| 19 |
return {std::forward<Args>(args)...}; |
| 20 |
} |
| 21 |
|
| 22 |
#endif // SUPPORT_MAKE_IMPLICIT_H |