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

static_assert on supported index and value types #1555

Open
upsj opened this issue Feb 24, 2024 · 0 comments
Open

static_assert on supported index and value types #1555

upsj opened this issue Feb 24, 2024 · 0 comments

Comments

@upsj
Copy link
Member

upsj commented Feb 24, 2024

To make issues like #1554 more clearly visible, we should have a static_assert in-place with our pre-compiled classes that prevents usage of unsupported types. Maybe something like

template <typename>
struct supported_index_type { constexpr static bool value = false; };
template <> struct supported_index_type<int32> { constexpr static bool value = true; };
template <> struct supported_index_type<int64> { constexpr static bool value = true; };

would help

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