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

Error compilling result.hpp on apple-clang. #6

Open
tcanabrava opened this issue May 5, 2022 · 6 comments
Open

Error compilling result.hpp on apple-clang. #6

tcanabrava opened this issue May 5, 2022 · 6 comments

Comments

@tcanabrava
Copy link

Linux Compier: GCC 11
Mac Compiler: latest apple-clang

The resulting code works on linux / gcc, but on mac I get:

/result.hpp:3524:82: error: ISO C++ requires the name after '::~' to be found in the same scope as the name before '::~' [-Werror,-Wdtor-name]
inline RESULT_INLINE_VISIBILITY RESULT_NS_IMPL::detail::result_union<T, E, false>::~result_union() noexcept(
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
                                                                                 ::result_union
@tcanabrava
Copy link
Author

This change fixes for me:

RESULT_NS_IMPL::detail::result_union<T,E,false>
  ::~result_union()

should read:

RESULT_NS_IMPL::detail::result_union<T,E,false>
  ::~result_union<T,E,false>()

@bitwizeshift
Copy link
Owner

bitwizeshift commented Jun 19, 2022

Thanks for opening this issue.

Funny, the StackOverflow question you linked is actually my question that I asked, researched, and answered regarding this exact problem; I just forgot to follow-up on this. 😅

I'll make this change shortly.

@bitwizeshift
Copy link
Owner

Also my apologies for missing this when it was opened; I apparently need to update my notification preferences.

@tarcisiofischer
Copy link

@tcanabrava Are you interested in making the PR for this?
If not or if you don't respond in the following days, I'll be happy to do it.

@bitwizeshift
Copy link
Owner

bitwizeshift commented Aug 25, 2022

I also don't mind making this change since it's basically a 1-line fix. The only thing that stopped me was CI failures since it's been a long time since I've updated everything.

I prefer having the safety net of CI to tell me when changes aren't accepted for older compilers, since some of them are "quirky", in what they deem to be valid C++.

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

3 participants