Skip to content

ACE headers can't be used with C++14 or C++17 #2477

Description

@ithinu

Latest snapshot of master, Ubuntu 22.04

The $ACE_ROOT/ace/config.h file

#define ACE_DISABLE_MKTEMP
#define ACE_DISABLE_READDIR_R
#define ACE_DISABLE_TEMPNAM
#define TAO_HAS_UIOP 0
#include "ace/config-linux.h"

The $ACE_ROOT/include/makeinclude/platform_macros.GNU file

CCFLAGS += -std=c++17
optimize = 0
include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU

Contents of $ACE_ROOT/bin/MakeProjectCreator/config/default.features

no_cxx11=0
no_cxx17=0
no_rapidjson=0

AREA/CLASS/EXAMPLE AFFECTED:

ACE compiles fine, but I cannot compile anything that includes its headers. I presumed C++17, but:

/usr/local/include/ace/CDR_Base.inl: In member function ‘ACE_CDR::Fixed::Proxy& ACE_CDR::Fixed::Proxy::operator+=(int)’:
/usr/local/include/ace/CDR_Base.inl:305:47: error: ambiguous overload for ‘operator+’ (operand types are ‘ACE_CDR::Fixed::Proxy’ and ‘int’)
305 | const Octet val = static_cast (*this + rhs);
| ~~~~~ ^ ~~~
| | |
| | int
| ACE_CDR::Fixed::Proxy

which looks like a C++14 code. But when attempting to compile with C++14:

/usr/local/include/ace/Global_Macros.h:61:3: error: #error ACE/TAO require C++17 compliance, please upgrade your compiler and/or fix the platform configuration for your environment
61 | # error ACE/TAO require C++17 compliance, please upgrade your compiler and/or fix the platform configuration for your environment

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions