Closed ville-v closed 2 years ago
can u fix it with pr?
I don't know what this class does (how to replace it) and the original nanogui does not have this file. So I used another GUI library instead.
Sure, is it new version?
Sure, is it new version?
Something like a new version with an other problem: https://github.com/lighttransport/nanort/blob/0bfd8fa97e979b3636136840cbe6cc70b8bc9f08/nanort.h#L131
class StackAllocator : public std::allocator<T> {
https://en.cppreference.com/w/cpp/memory/allocator
So isn't work with c++20
But is there anyway. https://github.com/dalerank/nanogui-sdl/blob/6785c6b617edce815ff2385d74612ef4adf7f549/sdlgui/nanort.h#L75
I think std::allocator_traits can replace std::allocator. Nanogui-sdl uses std::allocator in some other places and replacing those was recommended by Visual Studio.
https://en.cppreference.com/w/cpp/memory/allocator_traits
According to this, std::allocator is removed because it is (at least partially) duplicate of std::allocator_traits: https://stackoverflow.com/questions/39414610/why-are-are-stdallocators-construct-and-destroy-functions-deprecated-in-c17
std::unary_function is removed in C++17, therefore nanort.h does not compile. https://en.cppreference.com/w/cpp/utility/functional/unary_function
Tested in Visual Studio 2022.