Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
BillyONeal's avatar
BillyONeal
Honored Guest
9 years ago

Nonconforming allocator in the Oculus SDK $/LibOVRKernel/src/Kernel/OVR_Allocator.h

StdAllocatorSysMem does not comply with the standard because it is missing an operator!=. This will cause the SDK to fail to compile in new releases of the standard libraries. We discovered this issue in rolling builds of CRYENGINE.

The minimum change to fix the issue would be to add the missing operator!=:
bool operator!=(const this_type&) const
{
    return false;
}

Additionally, most of the allocator's content is actually not necessary, and can be replaced with the following: https://gist.github.com/BillyONeal/cb07926e01c60202ea7342b91f8c6487

How can I submit a patch to fix this problem?

Thanks!

Billy O'Neal
Visual C++ Libraries

2 Replies

  • @imperativity

    I think so? I'm not actually 100% positive; I arrived here only by reference from https://github.com/CRYTEK/CRYENGINE -- so it'll be whatever Oculus SDK release is bundled in https://github.com/CRYTEK/CRYENGINE/releases/tag/5.3.3

    Billy O'Neal
    Visual C++ Libraries
  • @BillyONeal

    Thanks for the report of the missing operator !=. I've added it to our main line for inclusion in an upcoming SDK.

    With respect to your report of unnecessary allocator members, with what version of the C++ standard are you considering this unnecessary? For example, the C++ standard up until C++17 requires a rebind function, at which point it's deprecated. Ditto for a number of other allocator members.