Skip to content

improve type traits support#2316

Merged
guwirth merged 1 commit intoSonarOpenCommunity:masterfrom
guwirth:improve-2306
Feb 18, 2022
Merged

improve type traits support#2316
guwirth merged 1 commit intoSonarOpenCommunity:masterfrom
guwirth:improve-2306

Conversation

@guwirth
Copy link
Copy Markdown
Collaborator

@guwirth guwirth commented Feb 18, 2022

Samples:

struct C {
    template<typename T, std::enable_if_t< std::is_integral_t<T>, int> = 0 >
    C( T num ) {}

    template<typename T, std::enable_if_t< std::is_integral_v<T>, int> = 0 >
    int foo( T num ) {}
};

template< typename T, std::enable_if_t< std::is_integral_v<T>, int> >
A operator+( T num ) {}

template< typename T, std::enable_if_t< std::is_integral_v<T>, int> = 0>
A operator+( T num ) {}

This change is Reviewable

- close SonarOpenCommunity#2306

```C++
struct C {
    template<typename T, std::enable_if_t< std::is_integral_t<T>, int> = 0 >
    C( T num ) {}

    template<typename T, std::enable_if_t< std::is_integral_v<T>, int> = 0 >
    int foo( T num ) {}
};

template< typename T, std::enable_if_t< std::is_integral_v<T>, int> >
A operator+( T num ) {}

template< typename T, std::enable_if_t< std::is_integral_v<T>, int> = 0>
A operator+( T num ) {}
```
@guwirth guwirth added the bug label Feb 18, 2022
@guwirth guwirth added this to the 2.0.7 milestone Feb 18, 2022
@guwirth guwirth self-assigned this Feb 18, 2022
@guwirth guwirth merged commit 84a3ea8 into SonarOpenCommunity:master Feb 18, 2022
@guwirth guwirth deleted the improve-2306 branch July 26, 2022 09:07
@guwirth guwirth restored the improve-2306 branch July 26, 2022 09:15
@guwirth guwirth deleted the improve-2306 branch July 26, 2022 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

template parameter std::enable_if_t not parsed

1 participant