HN user

rpasquay

1 karma
Posts0
Comments5
View on HN
No posts found.

I did not understand why on x86 Windows/MSVC cannot implement exceptions the same way as it was done for other architectures. I read that on x64 a different approach is used ("table based" - sounds to me like the "unwind code" approach mentioned in the article). Is this not possible no x86 for some reason ?

Is there any good book/resource about how all that fancy stuff you can use in Inkscape/Illustrator is actually implemented in terms of rendering. E.g. how are curves and lines with a thickness rendered or shapes that are defined by boolean operations etc. ?

I'm a bit surprised by this snippet from the "Traversing and manipulating data" example:

  for (auto& elem : *arr) {
      // visitation helps deal with the polymorphic nature of TOML data
      elem.visit([=](auto&& el) noexcept
      {
          if constexpr (toml::is_number<decltype(el)>)
              (*el)++;
          else if constexpr (toml::is_string<decltype(el)>)
              el = "five"sv;
      });
  }
I thought constexpr would work at compile time but how can the compile here inside a loop "know" when this labmda will encounter an int or a string ?