Removed C++11 specific code from the CSDK, added platform_features
[platform/upstream/iotivity.git] / resource / csdk / stack / include / octypes.h
index 12e600d..5f602ff 100644 (file)
@@ -28,6 +28,7 @@
 #ifndef OCTYPES_H_
 #define OCTYPES_H_
 
+#include "platform_features.h"
 #include "ocstackconfig.h"
 #include <stdbool.h>
 #include <stdint.h>
@@ -751,7 +752,7 @@ typedef struct OCHeaderOption
     /** pointer to its data.*/
     uint8_t optionData[MAX_HEADER_OPTION_DATA_LENGTH];
 
-#ifdef __cplusplus
+#ifdef SUPPORTS_DEFAULT_CTOR
     OCHeaderOption() = default;
     OCHeaderOption(OCTransportProtocolID pid,
                    uint16_t optId,
@@ -1131,7 +1132,7 @@ typedef struct OCCallbackData
     /** A pointer to a function to delete the context when this callback is removed.*/
     OCClientContextDeleter cd;
 
-#ifdef __cplusplus
+#ifdef SUPPORTS_DEFAULT_CTOR
     OCCallbackData() = default;
     OCCallbackData(void* ctx, OCClientResponseHandler callback, OCClientContextDeleter deleter)
         :context(ctx), cb(callback), cd(deleter){}