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

ref_counter typedef conflicts with persistent_data::ref_counter #184

Closed
ilyakurdyukov opened this issue Aug 4, 2021 · 1 comment
Closed

Comments

@ilyakurdyukov
Copy link

In persistent-data/data-structures/array.h:

	template <typename ValueTraits>
	class array : public array_base {
	public:
		class block_ref_counter : public ref_counter<uint64_t> {
		public:
		typedef typename ValueTraits::ref_counter ref_counter;

The ambiguity here is whether the ref_counter name refers to persistent_data::ref_counter or ValueTraits::ref_counter from the later typedef.

This gives errors when using compilers based on EDG frontend, and their developers think your code is wrong, not the compiler.

Possible solution:

-		class block_ref_counter : public ref_counter<uint64_t> {
+		class block_ref_counter : public persistent_data::ref_counter<uint64_t> {

It's better not to use the same name everywhere.

@jthornber
Copy link
Owner

I just pushed your fix. Thank you.

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

2 participants