sandbox
Loading...
Searching...
No Matches
enable_private_constructor.hpp
1// SPDX-License-Identifier: MIT
2#ifndef LIBSBX_UTILITY_ENABLE_PRIVATE_CONSTRUCTOR_HPP_
3#define LIBSBX_UTILITY_ENABLE_PRIVATE_CONSTRUCTOR_HPP_
4
5namespace sbx::utility {
6
7template<typename Derived>
8struct enable_private_constructor : public Derived {
9 template<typename... Args>
10 enable_private_constructor(Args&&... args) : Derived{std::forward<Args>(args)...} {}
11}; // struct enable_private_constructor
12
13} // namespace sbx::utility
14
15#endif // LIBSBX_UTILITY_ENABLE_PRIVATE_CONSTRUCTOR_HPP_
Definition: enable_private_constructor.hpp:8