Opened 8 years ago

Closed 5 years ago

#6423 closed enhancement (wontfix)

Something other than static_cast for going void * to a type pointer

Reported by: Kurt Schwehr Owned by: Kurt Schwehr
Priority: low Milestone: closed_because_of_github_migration
Component: default Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

For some time down the road, consider...

http://www.boost.org/doc/libs/1_58_0/libs/serialization/doc/void_cast.html

e.g. maybe call it down_cast or void_cast or void_downcast, something like:

template <class To> To * void_downcast(void *from_ptr) { 
   return reinterpret_cast<To *>(from_ptr);
}

That will let us separate from things like

static_cast<int>(1.234)

Change History (1)

comment:1 by Even Rouault, 5 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: newclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.