The default constructor cannot be referenced - this is a remote function in VS

I am trying to compile code from https://github.com/zcbenz/BPlusTree in the Visual Studio 2015 community. The code can be compiled in gcc, but in VS I got

the default constructor "bpt :: internal_node_t" cannot be referenced - this is a remote function

the structure is as follows:

struct internal_node_t {
    typedef index_t * child_t;

    off_t parent; /* parent node offset */
    off_t next;
    off_t prev;
    size_t n; /* how many children */
    index_t children[BP_ORDER];
}; 

links can be seen everywhere in bpt.ccfor example

internal_node_t parent;

I do not understand what a message is. How to make code compiled in VS?

some type definition definition:

struct key_t {
    char k[16];

    key_t(const char *str = "")
    {
        bzero(k, sizeof(k));
        strcpy_s(k, str);
    }
};
typedef unsigned int     size_t;

struct index_t {
    key_t key;
    off_t child; /* child offset */
};

I use off_tin <sys\types.h>and marco #define bzero(ptr, size) memset(ptr, 0, size)forbzero

I am also writing another program:

#include <sys/types.h>
#include <string.h>

#define bzero(ptr, size) memset(ptr, 0, size)

struct key_t {
    char k[16];

    key_t(const char *str = "")
    {
        bzero(k, sizeof(k));
        strcpy_s(k, str);
    }
};
struct index_t {
    key_t key;
    off_t child; /* child offset */
};



struct internal_node_t {
    typedef index_t * child_t;

    off_t parent; /* parent node offset */
    off_t next;
    off_t prev;
    size_t n; /* how many children */
    index_t children[20];
};

int main() {
    internal_node_t t;
}

This works in VS2015.

+4
source share
1

, , POSIX, , Windows. , - Cygwin.

, off_t, key_t <sys/types.h>. , .

: VS2015 off_t. , System V IPC (<sys/ipc.h>, , key_t), Linux.

+2

Source: https://habr.com/ru/post/1607306/


All Articles