VirtualBox

Changeset 95117 in vbox for trunk/src/VBox/Main/src-server


Ignore:
Timestamp:
May 25, 2022 8:56:27 PM (3 years ago)
Author:
vboxsync
Message:

Main/MediumImpl: std::unary_function was removed in c++17 and VC++ really does not have it in that mode, so #if our way around the two uses here (c++17).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/MediumImpl.cpp

    r94787 r95117  
    6969{
    7070    /** Equality predicate for stdc++. */
    71     struct EqualsTo : public std::unary_function <SnapshotRef, bool>
     71    struct EqualsTo
     72#if __cplusplus < 201700 /* deprecated in C++11, removed in C++17. */
     73        : public std::unary_function <SnapshotRef, bool>
     74#endif
    7275    {
    7376        explicit EqualsTo(const Guid &aSnapshotId) : snapshotId(aSnapshotId) {}
    7477
     78#if __cplusplus < 201700 /* deprecated in C++11, removed in C++17. */
    7579        bool operator()(const argument_type &aThat) const
     80#else
     81        bool operator()(const SnapshotRef &aThat) const
     82#endif
    7683        {
    7784            return aThat.snapshotId == snapshotId;
     
    100107{
    101108    /** Equality predicate for stdc++. */
    102     struct EqualsTo : public std::unary_function <BackRef, bool>
     109    struct EqualsTo
     110#if __cplusplus < 201700 /* deprecated in C++11, removed in C++17. */
     111        : public std::unary_function <BackRef, bool>
     112#endif
    103113    {
    104114        explicit EqualsTo(const Guid &aMachineId) : machineId(aMachineId) {}
    105115
     116#if __cplusplus < 201700 /* deprecated in C++11, removed in C++17. */
    106117        bool operator()(const argument_type &aThat) const
     118#else
     119        bool operator()(const BackRef &aThat) const
     120#endif
    107121        {
    108122            return aThat.machineId == machineId;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette