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

Fix issue #6 in main branch: #7

Merged
merged 1 commit into from
May 10, 2020

Conversation

gazoodle
Copy link
Collaborator

Generic template class needed const ref to avoid copy constructor being called.
Added tests to validate

Generic template class needed const ref to avoid copy constructor being called.
Added tests to validate
@peterpolidoro
Copy link
Member

Great work, thank you so much!

@peterpolidoro peterpolidoro merged commit cb983b2 into janelia-arduino:master May 10, 2020
@peterpolidoro
Copy link
Member

Hi! Someone opened an issue #8 having problems including type_traits. When is type_traits intended to be available, when someone is not using Arduino AVR? What about all of the other cases when type_traits would not be available? Do we ever really need to include type_traits or can we simply always use the trival version of is_signed?

@gazoodle
Copy link
Collaborator Author

It was belt and braces coding. Normally a modern C++ compiler would have the type traits from the STL collection, but some of the tool chains didn’t have this hence the “light” version. Of course we could always use the light version since we’re only interested in the is_signed functionality, so removal of the include and conditional should be fine, except for the case where someone has <type_traits> included as well, then you’d get a conflict. I suspect we can fix it using namespaces. Let me have a play around and I’ll get a fix checked in.

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

Successfully merging this pull request may close these issues.

2 participants