mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
Fix doxygen error
It can't parse the std::enable_if bits in the range constructor of Struct, so skip it.
This commit is contained in:
parent
0bb497c816
commit
646ce85ea6
1 changed files with 21 additions and 14 deletions
|
@ -16,12 +16,13 @@ LICENSE END */
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
|
||||||
namespace sixtyfps::cbindgen_private {
|
namespace sixtyfps::cbindgen_private {
|
||||||
// This has to stay opaque, but VRc don't compile if it is just forward declared
|
// This has to stay opaque, but VRc don't compile if it is just forward declared
|
||||||
struct ErasedComponentBox : vtable::Dyn {
|
struct ErasedComponentBox : vtable::Dyn
|
||||||
~ErasedComponentBox() = delete;
|
{
|
||||||
ErasedComponentBox() = delete;
|
~ErasedComponentBox() = delete;
|
||||||
ErasedComponentBox(ErasedComponentBox&) = delete;
|
ErasedComponentBox() = delete;
|
||||||
};
|
ErasedComponentBox(ErasedComponentBox &) = delete;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace sixtyfps::interpreter {
|
namespace sixtyfps::interpreter {
|
||||||
|
@ -63,14 +64,19 @@ public:
|
||||||
|
|
||||||
inline Struct(std::initializer_list<std::pair<std::string_view, Value>> args);
|
inline Struct(std::initializer_list<std::pair<std::string_view, Value>> args);
|
||||||
|
|
||||||
template<typename InputIterator,
|
template<typename InputIterator
|
||||||
|
// Doxygen doesn't understand this template wizardry
|
||||||
|
#if !defined(DOXYGEN)
|
||||||
|
,
|
||||||
typename std::enable_if_t<
|
typename std::enable_if_t<
|
||||||
std::is_convertible<decltype(std::get<0>(*std::declval<InputIterator>())),
|
std::is_convertible<decltype(std::get<0>(*std::declval<InputIterator>())),
|
||||||
std::string_view>::value
|
std::string_view>::value
|
||||||
&& std::is_convertible<decltype(std::get<1>(*std::declval<InputIterator>())),
|
&& std::is_convertible<decltype(std::get<1>(*std::declval<InputIterator>())),
|
||||||
Value>::value
|
Value>::value
|
||||||
|
|
||||||
> * = nullptr>
|
> * = nullptr
|
||||||
|
#endif
|
||||||
|
>
|
||||||
Struct(InputIterator it, InputIterator end) : Struct()
|
Struct(InputIterator it, InputIterator end) : Struct()
|
||||||
{
|
{
|
||||||
for (; it != end; ++it) {
|
for (; it != end; ++it) {
|
||||||
|
@ -367,7 +373,9 @@ class ComponentInstance : vtable::Dyn
|
||||||
|
|
||||||
// ComponentHandle<ComponentInstance> is in fact a VRc<ComponentVTable, ErasedComponentBox>
|
// ComponentHandle<ComponentInstance> is in fact a VRc<ComponentVTable, ErasedComponentBox>
|
||||||
const cbindgen_private::ErasedComponentBox *inner() const
|
const cbindgen_private::ErasedComponentBox *inner() const
|
||||||
{ return reinterpret_cast<const cbindgen_private::ErasedComponentBox *>(this); }
|
{
|
||||||
|
return reinterpret_cast<const cbindgen_private::ErasedComponentBox *>(this);
|
||||||
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void show() const
|
void show() const
|
||||||
|
@ -460,13 +468,12 @@ public:
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
~ComponentDefinition() { sixtyfps_interpreter_component_definition_destructor(&inner); }
|
~ComponentDefinition() { sixtyfps_interpreter_component_definition_destructor(&inner); }
|
||||||
ComponentHandle<ComponentInstance> create() const {
|
ComponentHandle<ComponentInstance> create() const
|
||||||
|
{
|
||||||
union CI {
|
union CI {
|
||||||
cbindgen_private::ComponentInstance i;
|
cbindgen_private::ComponentInstance i;
|
||||||
~CI() {
|
~CI() { i.~ComponentInstance(); }
|
||||||
i.~ComponentInstance();
|
CI() { }
|
||||||
}
|
|
||||||
CI() {}
|
|
||||||
} u;
|
} u;
|
||||||
cbindgen_private::sixtyfps_interpreter_component_instance_create(&inner, &u.i);
|
cbindgen_private::sixtyfps_interpreter_component_instance_create(&inner, &u.i);
|
||||||
return *reinterpret_cast<ComponentHandle<ComponentInstance> *>(&u.i);
|
return *reinterpret_cast<ComponentHandle<ComponentInstance> *>(&u.i);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue