Skip to content
代码片段 群组 项目
  1. 1月 31, 2022
  2. 1月 30, 2022
  3. 1月 29, 2022
  4. 1月 28, 2022
    • Olivier Goffart's avatar
      Test (and fix) using [] on a temporary array · e28586ed
      Olivier Goffart 创作于
      The C++ code did not compile because it couldn't deduce the template parameter
      properly. Since the lambda became a bit big to be placed in one small string,
      I moved it into a real function in the header
      
      Example of error:   (sorry for the long lines :-))
      
      ```
      tmp/.tmpE42a4c.cpp: In member function 'void TestCase::init(const TestCase*, sixtyfps::cbindgen_private::ComponentWeak, uintptr_t, uintptr_t)':
      
      /tmp/.tmpE42a4c.cpp:67:238: error: no match for call to '(TestCase::init(const TestCase*, sixtyfps::cbindgen_private::ComponentWeak, uintptr_t, uintptr_t)::<lambda(const std::shared_ptr<sixtyfps::Model<ModelData> >&, const auto:24&)>) (std::shared_ptr<sixtyfps::private_api::ArrayModel<2, sixtyfps::SharedString> >, int)'
         67 |     self->root_window_1_hello_world.set([&]<typename D>(const std::shared_ptr<sixtyfps::Model<D>> &model, const auto &index) -> D { model->track_row_data_changes(index); if (const auto v = model->row_data(index)) return *v; return D(); }(std::make_shared<sixtyfps::private_api::ArrayModel<2,sixtyfps::SharedString>>(sixtyfps::SharedString ( sixtyfps::SharedString(u8"hello") ), sixtyfps::SharedString ( sixtyfps::SharedString(u8"world") )), 1));
            |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /tmp/.tmpE42a4c.cpp:67:41: note: candidate: 'template<class D, class auto:24> TestCase::init(const TestCase*, sixtyfps::cbindgen_private::ComponentWeak, uintptr_t, uintptr_t)::<lambda(const std::shared_ptr<sixtyfps::Model<ModelData> >&, const auto:24&)>'
         67 |     self->root_window_1_hello_world.set([&]<typename D>(const std::shared_ptr<sixtyfps::Model<D>> &model, const auto &index) -> D { model->track_row_data_changes(index); if (const auto v = model->row_data(index)) return *v; return D(); }(std::make_shared<sixtyfps::private_api::ArrayModel<2,sixtyfps::SharedString>>(sixtyfps::SharedString ( sixtyfps::SharedString(u8"hello") ), sixtyfps::SharedString ( sixtyfps::SharedString(u8"world") )), 1));
            |                                         ^
      /tmp/.tmpE42a4c.cpp:67:41: note:   template argument deduction/substitution failed:
      /tmp/.tmpE42a4c.cpp:67:238: note:   mismatched types 'sixtyfps::Model<ModelData>' and 'sixtyfps::private_api::ArrayModel<2, sixtyfps::SharedString>'
         67 |     self->root_window_1_hello_world.set([&]<typename D>(const std::shared_ptr<sixtyfps::Model<D>> &model, const auto &index) -> D { model->track_row_data_changes(index); if (const auto v = model->row_data(index)) return *v; return D(); }(std::make_shared<sixtyfps::private_api::ArrayModel<2,sixtyfps::SharedString>>(sixtyfps::SharedString ( sixtyfps::SharedString(u8"hello") ), sixtyfps::SharedString ( sixtyfps::SharedString(u8"world") )), 1));
            |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ```
      e28586ed
    • Olivier Goffart's avatar
      2e10b41b
    • Olivier Goffart's avatar
      Some changes to the migration docs · 5ceeecf2
      Olivier Goffart 创作于
      Fixes #888
      5ceeecf2
    • Simon Hausmann's avatar
      janitor: fix link to Rust migration guide from changelog · 84a62cc1
      Simon Hausmann 创作于
      A brown paper bag for me :-)
      84a62cc1
    • Olivier Goffart's avatar
      Add some items to the changelog · 95383b88
      Olivier Goffart 创作于
      95383b88