mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
Format all C++ and Java code via clang-format
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
@@ -6,16 +6,14 @@
|
||||
namespace generator
|
||||
{
|
||||
template <typename T, typename... Args>
|
||||
std::enable_if_t<std::is_constructible<T, Args...>::value, std::shared_ptr<T>>
|
||||
create(Args&&... args)
|
||||
std::enable_if_t<std::is_constructible<T, Args...>::value, std::shared_ptr<T>> create(Args &&... args)
|
||||
{
|
||||
return std::make_shared<T>(std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
// impossible to construct
|
||||
template <typename T, typename... Args>
|
||||
std::enable_if_t<!std::is_constructible<T, Args...>::value, std::shared_ptr<T>>
|
||||
create(Args&&... )
|
||||
std::enable_if_t<!std::is_constructible<T, Args...>::value, std::shared_ptr<T>> create(Args &&...)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user