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