snitch-org / snitch

Lightweight C++20 testing framework.
Boost Software License 1.0
268 stars 10 forks source link

Suspicious static_assert condition in get_format_code() #66

Closed tocic closed 1 year ago

tocic commented 1 year ago

https://github.com/cschreib/snitch/blob/eaa322ce9e7bbfbd0b39aa529ea59de4acbd9c42/src/snitch.cpp#L61-L64

I think static_assert(not std::is_same_v<T, T>, "unsupported type"); was implied. Now it leads to UB.

cschreib commented 1 year ago

Good catch!