Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Doubt with Buffer<> of a trivially destructible type
Re: Doubt with Buffer<> of a trivially destructible type [message #61250 is a reply to message #61246] Sun, 15 December 2024 12:25 Go to previous messageGo to previous message
koldo is currently offline  koldo
Messages: 3437
Registered: August 2008
Senior Veteran
Lance wrote on Sat, 14 December 2024 20:53
I believe this is something that should and can be addressed of at compile time by making Upp::Vector more robust.

I am surprised std::vector is guilty of the same problem. I will take a look to see if more recent standard library has fixed it.

Yes. This code gives the same error:
CONSOLE_APP_MAIN
{
	typedef double Vector3[3];
		
	std::vector<Vector3> vector3_data(10);
}

Because of this in file clang\include\c++\v1\__memory\allocator.h:
_LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_HIDE_FROM_ABI void destroy(pointer __p) { __p->~_Tp(); }


Best regards
IƱaki
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to respond when memory is exceeded
Next Topic: Stream Load serialization fired twice
Goto Forum:
  


Current Time: Fri Jun 06 09:00:12 CEST 2025

Total time taken to generate the page: 0.04604 seconds