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

Support for data() method call for C++11 and after #609

Closed
wants to merge 2 commits into from

Conversation

rishitc
Copy link

@rishitc rishitc commented Feb 27, 2021

To get a pointer to the first element of the underlying array used by the vector, C++11 and beyond, provides the data() method.
Support for this call has been added with suitable preprocessor checks for the C++ standard used during compilation.

To get a pointer to the first element of the underlying array used by the _vector_, C++11 and beyond, provides the ```data()``` method. 
Support for this call has been added with suitable preprocessor checks for the C++ standard used during compilation.
@rishitc rishitc changed the title Support for data() method call for C++11 Support for data() method call for C++11 and after Feb 27, 2021
Reduced code repetition and unified all the operations and calls of ```&*begin()``` to ```data()```.
@rishitc
Copy link
Author

rishitc commented Feb 28, 2021

I made the recommended changes but the tests still failed. I then even tried merging the &*begin() calls to data().
The vector class on compiling locally on my system, gave no errors.

Any inputs of why the tests failed would be really helpful!

I did check CircleCI, but the error messages reported are not useful. The website also says some changes need to be made to the config file to save the test results.

Thanks.

@rishitc
Copy link
Author

rishitc commented Feb 28, 2021

I'm extremely sorry for opening a new pull request. I'll close the old one and we can continue further discussions in this thread.

@kevina
Copy link
Member

kevina commented Feb 28, 2021

I'm extremely sorry for opening a new pull request. I'll close the old one and we can continue further discussions in this thread.

Please don't. Opening a new pull request was the correct thing to do.

@kevina
Copy link
Member

kevina commented Feb 28, 2021

I'm extremely sorry for opening a new pull request. I'll close the old one and we can continue further discussions in this thread.

Please don't. Opening a new pull request was the correct thing to do.

Oops. Sorry. I wasn't following what was going on.

Please do close this one.

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.

None yet

2 participants