slint/api/cpp/include
Olivier Goffart 331e5713c2 C++: Use a static_assert to detect Slint version mismatch
cc #2909 , #223

New message:
```
/home/olivier/slint/build2/examples/gallery/gallery.h:6:73: error: static assertion failed: This file was generated with Slint compiler version 1.1.1, but the Slint library used is 1.1.0. The version numbers must match exactly.
    6 | static_assert(1 == SLINT_VERSION_MAJOR && 1 == SLINT_VERSION_MINOR && 1 == SLINT_VERSION_PATCH, "This file was generated with Slint compiler version 1.1.1, but the Slint library used is " SLINT_VERSION_STRING ". The version numbers must match exactly.");
/home/olivier/slint/build2/examples/gallery/gallery.h:6:73: note: the comparison reduces to ‘(1 == 0)’
```

Previous message:
```
/home/olivier/slint/build2/examples/printerdemo/cpp/printerdemo.h:12218:161: error: conversion from ‘VersionCheckHelper<[...],[...],0>’ to non-scalar type ‘VersionCheckHelper<[...],[...],1>’ requested
12218 | [[maybe_unused]] constexpr slint::private_api::VersionCheckHelper<1, 1, 1> THE_SAME_VERSION_MUST_BE_USED_FOR_THE_COMPILER_AND_THE_RUNTIME = slint::private_api::VersionCheckHelper<SLINT_VERSION_MAJOR, SLINT_VERSION_MINOR, SLINT_VERSION_PATCH>();
      |                                                                                                                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/olivier/slint/build2/examples/printerdemo/cpp/printerdemo.h:12218:161: error: could not convert ‘slint::private_api::VersionCheckHelper<1, 1, 0>()’ from ‘VersionCheckHelper<[...],[...],0>’ to ‘VersionCheckHelper<[...],[...],1>’
12218 | [[maybe_unused]] constexpr slint::private_api::VersionCheckHelper<1, 1, 1> THE_SAME_VERSION_MUST_BE_USED_FOR_THE_COMPILER_AND_THE_RUNTIME = slint::private_api::VersionCheckHelper<SLINT_VERSION_MAJOR, SLINT_VERSION_MINOR, SLINT_VERSION_PATCH>();
      |                                                                                                                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                                                                                                 |
      |                                                                                                                                                                 VersionCheckHelper<[...],[...],0>
```
2023-06-28 14:16:52 +02:00
..
slint.h C++: Use a static_assert to detect Slint version mismatch 2023-06-28 14:16:52 +02:00
slint_brush.h Domain: slint-ui.com -> slint.dev 2023-06-16 10:55:08 +02:00
slint_callbacks.h Domain: slint-ui.com -> slint.dev 2023-06-16 10:55:08 +02:00
slint_color.h Domain: slint-ui.com -> slint.dev 2023-06-16 10:55:08 +02:00
slint_config.h Domain: slint-ui.com -> slint.dev 2023-06-16 10:55:08 +02:00
slint_image.h doc: Document coordinate system expectations for borrowed textures 2023-06-26 12:49:22 +02:00
slint_interpreter.h Domain: slint-ui.com -> slint.dev 2023-06-16 10:55:08 +02:00
slint_pathdata.h Domain: slint-ui.com -> slint.dev 2023-06-16 10:55:08 +02:00
slint_platform.h Domain: slint-ui.com -> slint.dev 2023-06-16 10:55:08 +02:00
slint_point.h Domain: slint-ui.com -> slint.dev 2023-06-16 10:55:08 +02:00
slint_properties.h Domain: slint-ui.com -> slint.dev 2023-06-16 10:55:08 +02:00
slint_sharedvector.h Domain: slint-ui.com -> slint.dev 2023-06-16 10:55:08 +02:00
slint_size.h Domain: slint-ui.com -> slint.dev 2023-06-16 10:55:08 +02:00
slint_string.h Domain: slint-ui.com -> slint.dev 2023-06-16 10:55:08 +02:00
slint_testing.h Domain: slint-ui.com -> slint.dev 2023-06-16 10:55:08 +02:00
vtable.h Domain: slint-ui.com -> slint.dev 2023-06-16 10:55:08 +02:00