You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
change vector tile value comparisons to numeric #166
I think we should open source @artemp's c++11 variant.hpp to a new repo at mapbox/variant.hpp. Then we can track issues, new requirements, and tests in a standalone repo. Sound good @artemp and @kkaefer?
What are the next steps to fully getting this working in llmr-native? @kkaefer - do you have all you need to to plug this in?
I'm not clear if bc29ed5 is a good way to fix this or not (the template use is a bit beyond me). The docs aren't very specific on why std::invalid_argument would get thrown if you pass a valid std::string, only that it can happen (no conversion could be performed). Would appreciate a look over this.
The above commit is not a good way to fix it and introduces other problems.
What my real root problem is, and why no one else was seeing it, is that I break on exceptions, which is a pretty common Xcode practice:
However, std::stoll et al. as part of normal behavior throw exceptions. We want to catch these, ignore the exception, but still return something usable.
It's a bit unclear why you see exceptions being thrown. They should be caught. While I agree that invalid input shouldn't be an exception (because it's nothing unusual to happen), the STL works this way. Boost's lexical_cast also throws exceptions.
The only alternative is to use strtol and equivalents rather than stod. Honestly, I'm not sure what the difference is really, except for the differing arguments.
Ok, I had a hunch based on that code but wasn't sure how it was working. Thanks. Do you also see multiple unhanded exceptions if you add the "All Exceptions" breakpoint in Xcode? That just seems really weird to me, and it's going to make any other legitimate use of the breakpoint really difficult.
Activity
kkaefer commentedon May 5, 2014
@artemp implemented this in https://gist.github.com/artemp/102751a0b8b27aa9642f.
artemp commentedon May 5, 2014
binary visitation support 40e3372
artemp commentedon May 5, 2014
updated use-case : https://gist.github.com/artemp/3ef1f62f28d65438d72d
springmeyer commentedon May 5, 2014
mapbox/variant.hpp. Then we can track issues, new requirements, and tests in a standalone repo. Sound good @artemp and @kkaefer?kkaefer commentedon May 5, 2014
@springmeyer: No action on your or @artemp's side needed; I just need to add the code and add a test for it.
kkaefer commentedon May 8, 2014
This is done in ee55798.
incanus commentedon May 12, 2014
I get frequent crashes with this as used in
masteror as merged intooutdoors-style.springmeyer commentedon May 12, 2014
It looks like
std::stollis throwing on invalid input. Wrap in atry/catchin order to see the error...refs #166: fix for std::stoll et al. not handling strings
incanus commentedon May 12, 2014
I'm not clear if bc29ed5 is a good way to fix this or not (the template use is a bit beyond me). The docs aren't very specific on why
std::invalid_argumentwould get thrown if you pass a validstd::string, only that it can happen (no conversion could be performed). Would appreciate a look over this.refs #166: fix for std::stoll et al. not handling strings
Revert "refs #166: fix for std::stoll et al. not handling strings"
Revert "refs #166: fix for std::stoll et al. not handling strings"
incanus commentedon May 13, 2014
Ok, I've discovered that:
The above commit is not a good way to fix it and introduces other problems.
What my real root problem is, and why no one else was seeing it, is that I break on exceptions, which is a pretty common Xcode practice:
However,
std::stollet al. as part of normal behavior throw exceptions. We want to catch these, ignore the exception, but still return something usable.kkaefer commentedon May 13, 2014
It's a bit unclear why you see exceptions being thrown. They should be caught. While I agree that invalid input shouldn't be an exception (because it's nothing unusual to happen), the STL works this way. Boost's
lexical_castalso throws exceptions.The only alternative is to use
strtoland equivalents rather thanstod. Honestly, I'm not sure what the difference is really, except for the differing arguments.incanus commentedon May 13, 2014
Ok, I had a hunch based on that code but wasn't sure how it was working. Thanks. Do you also see multiple unhanded exceptions if you add the "All Exceptions" breakpoint in Xcode? That just seems really weird to me, and it's going to make any other legitimate use of the breakpoint really difficult.
kkaefer commentedon May 14, 2014
Seems like this is causing a significant performance issue too:
artemp commentedon May 14, 2014
@kkaefer - bottleneck is exception stack unwinding, am I reading ^^ correctly ?
kkaefer commentedon May 14, 2014
yes
incanus commentedon May 20, 2014
Closing since the original issue is solved in favor of dealing with the exceptions later in #225.