Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check and fix isStringType() deprecation #778

Closed
daniel-zullo opened this issue Oct 29, 2019 · 1 comment
Closed

Check and fix isStringType() deprecation #778

daniel-zullo opened this issue Oct 29, 2019 · 1 comment

Comments

@daniel-zullo
Copy link

daniel-zullo commented Oct 29, 2019

isStringType() was deprecated and isUTF8StringType() should be used instead but the latter fails if a static array is checked.

unittest
{
    static assert (isStringType!(char[6])); // true -> passes
    static assert (isUTF8StringType!(char[6])); // false -> fails
}
daniel-zullo pushed a commit to daniel-zullo/ocean-1 that referenced this issue Oct 29, 2019
The function `ocean.meta.traits.Arrays.isUTF8StringType()` is suggested to
replace the deprecated `ocean.core.Traits.isStringType()` but it failed to
check for static arrays and now it is fixed to support both basic kind of
arrays.

Fixes sociomantic-tsunami#778
ben-palmer-sociomantic pushed a commit that referenced this issue Oct 30, 2019
The function `ocean.meta.traits.Arrays.isUTF8StringType()` is suggested to
replace the deprecated `ocean.core.Traits.isStringType()` but it failed to
check for static arrays and now it is fixed to support both basic kind of
arrays.

Fixes #778
@daniel-zullo
Copy link
Author

Closed by #779

Geod24 added a commit that referenced this issue Dec 12, 2020
v5.1.5: Fix isUTF8StringType to work with static arrays

## Bug Fixes

### Fix function to check for UTF-8 string type

`ocean.meta.traits.Arrays`

The function `ocean.meta.traits.Arrays.isUTF8StringType()` is suggested to
replace the deprecated `ocean.core.Traits.isStringType()` but it failed to
check for static arrays and now it is fixed to support both basic kind of
arrays.

See #778
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant