Fix build when a single ctor is registered
This commit is contained in:
parent
40c24e28ac
commit
ea19e35f85
2 changed files with 18 additions and 14 deletions
27
README.md
27
README.md
|
@ -117,6 +117,19 @@ executable('my_project',
|
|||
)
|
||||
```
|
||||
|
||||
And the matching wrenpp.wrap file for your project (remember to update the
|
||||
revision SHA and the dependency name):
|
||||
|
||||
```
|
||||
[wrap-git]
|
||||
url = https://alarmpi.no-ip.org/gitan/King_DuckZ/wrenpp.git
|
||||
revision = ebca413c0a3e885ac1901bd555e127476c40b057
|
||||
|
||||
[provide]
|
||||
wrenpp = wrenpp_dep
|
||||
dependency_names = wrenpp-0.1.3
|
||||
```
|
||||
|
||||
This will make Wrenpp build as part of your project with Wren's optional random
|
||||
module enabled.
|
||||
|
||||
|
@ -130,16 +143,6 @@ wrenpp_dep = dependency('wrenpp', version: '>=0.1.0',
|
|||
)
|
||||
```
|
||||
|
||||
Note that when you use Wrenpp as a subproject, Wrenpp's subproject Wren will
|
||||
become a sub-subproject of your project. This is how Meson works and it simply
|
||||
means that in your top level source directory you will have to run this command
|
||||
before you will be able to compile (Meson should detect and print this as
|
||||
well):
|
||||
|
||||
```
|
||||
meson wrap promote subprojects/wrenpp/subprojects/wren
|
||||
```
|
||||
|
||||
### C++ ###
|
||||
|
||||
For working examples refer to the source files in the `examples/` directory.
|
||||
|
@ -161,8 +164,8 @@ at least. A description of all the relevant header files follows:
|
|||
* `def_configuration.hpp` The `DefConfiguration` struct extends the bare
|
||||
`Configuration` struct by providing an implementation for `write_fn`,
|
||||
`error_fn` and `reallocate_fn`. They are implemented in terms of `std::cout`,
|
||||
`std::cerr` and `new[]`/`delete[]` respectively. You can safely ignore this
|
||||
header if this is not suitable for your project.
|
||||
`std::cerr` and `std::realloc`/`std::free` respectively. You can safely ignore
|
||||
this header if this is not suitable for your project.
|
||||
|
||||
Other header files are intended for Wrenpp's use and you shouldn't need to use
|
||||
them. You are free to use them in your project if you think the code inside is
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue