Fix build when a single ctor is registered

This commit is contained in:
King_DuckZ 2024-05-24 16:57:16 +02:00
commit ea19e35f85
2 changed files with 18 additions and 14 deletions

View file

@ -1,4 +1,4 @@
/* Copyright 2020-2022, Michele Santullo
/* Copyright 2020-2024, Michele Santullo
* This file is part of wrenpp.
*
* Wrenpp is free software: you can redistribute it and/or modify
@ -118,7 +118,8 @@ namespace wren {
template <typename... Args>
constexpr void static_assert_all_packs_are_unique() {
if constexpr (sizeof...(Args) > 0) {
//If more than one arg (ctor overload) is given, check they are unique
if constexpr (sizeof...(Args) > 1) {
constexpr auto dummy = AssertIfDuplicateValues<ForeignParamHelper<Args>::argument_count...>::value;
static_assert(dummy == 1); //always true
}