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

compilation error due to std::remove_reference #512

Closed
toge opened this issue Jul 3, 2023 · 5 comments · Fixed by #513
Closed

compilation error due to std::remove_reference #512

toge opened this issue Jul 3, 2023 · 5 comments · Fixed by #513

Comments

@toge
Copy link

toge commented Jul 3, 2023

I met compilation error on EASTL 3.21.12.

In file included from include/EASTL/type_traits.h:1033,
                 from include/EASTL/internal/move_help.h:16,
                 from include/EASTL/functional.h:11,
                 from include/EASTL/internal/fixed_pool.h:28,
                 from source/fixed_pool.cpp:6:
include/EASTL/internal/type_transformations.h:500:74: error: 'remove_reference' in namespace 'std' does not name a template type
  500 |                 auto try_add_pointer(int) -> type_identity<typename std::remove_reference<T>::type*>;
      |                                                                          ^~~~~~~~~~~~~~~~
include/EASTL/internal/type_transformations.h:500:90: error: expected template-argument before '<' token
  500 |                 auto try_add_pointer(int) -> type_identity<typename std::remove_reference<T>::type*>;

Environments as follows:

  • OS: Debian stretch
  • Compiler: gcc 12.1.0
  • EASTL: 3.21.12

I succeeded compilation on EASTL 3.17.03.

I think it is caused by modification of include/EASTL/internal/type_transformations.h.

1aa7846#diff-6b653b7c05d254bf37fddd53af0feb52d423005e81fadbae783b1d8e6054d74e

I thknk try_add_pointer(int) should use eastl::remove_reference?

template <typename T>
auto try_add_pointer(int) -> type_identity<typename eastl::remove_reference<T>::type*>;
@jhopkins-ea
Copy link
Contributor

Yes, you're right. I see there's references to std in array.h and span.h that shouldn't be there either.

@jhopkins-ea
Copy link
Contributor

let me know if that branch fixes your issues and I'll merge if so.

@toge
Copy link
Author

toge commented Jul 5, 2023

@jhopkins-ea
Thanks for your quick action!
It works fine for me.

@AbrilRBS
Copy link

AbrilRBS commented Jul 6, 2023

@jhopkins-ea thanks a lot for fixing it so quickly :)

We're adding the latest release over at Conan (Thanks @toge for contributing it!) and as we were affected by this bug, I have just a few questions:
Is there a patch release planed for the near future to pick this change up? Or if not, can you say if the next update is some time away still? We're currently considering applying the patch directly as a backport, but would much rather use a proper release.

Thanks a lot! :)

@jhopkins-ea
Copy link
Contributor

EASTL releases are fairly ad hoc. I'd recommend backporting the fix for now.

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 a pull request may close this issue.

3 participants