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 #61221 is a reply to message #61220] Thu, 12 December 2024 14:15 Go to previous messageGo to previous message
Oblivion is currently offline  Oblivion
Messages: 1226
Registered: August 2007
Senior Contributor
Hello IƱaki,

Quote:

However, vector3_destructible gets true.


Yes, because std::is_trivially_destructible removes all extents (dimensions) of the object in question before its type gets evaluated. So, basically it is returning true for double type.

However, Buffer<Vector3> doesn't. So it expands into Buffer<double[3]>, hence the error.

I think you should instead prefer -if possible- a structure or Buffer<double> mybuffer(count * 3).

Then again, I don't know the exact requirements of your code.


Best regards,
Oblivion


[Updated on: Thu, 12 December 2024 14:17]

Report message to a moderator

 
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: Tue Aug 26 04:50:18 CEST 2025

Total time taken to generate the page: 0.05400 seconds