🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Borneq Sat, 30 Jun 2018 11:56
Moduły c++
#309728
Author: Borneq
Date: Sat, 30 Jun 2018 11:56
32 lines
1625 bytes
To największa zmiana od czasu powstania C++ na bazie C.
Są bardzo potrzebne, bo budowa LLVM na moim wirtualnym Linuxie trwała 
kilka godzin od 9.45 do 13.04 , powstało 27.6 Giga w katalogu build.

https://gcc.gnu.org/wiki/cxx-modules
Put the following in hello.cc:

module;
#include <stdio.h>
export module hello;
export void greeter (const char *name)
{
   printf ("Hello %s!\n", name);
}

and put the following in main.cc:

import hello;
int main (void)
{
   greeter ("world");
   return 0;
}

Now compile with:

    g++ -fmodules-ts main.cc hello.cc

Już działa w najnowszej wersji.
teraz jak widzę, brakuje tylko modułów biblioteki standardowej
oraz wypuszczone już GCC jeszcze nie obsługują.
Teraz tylko czekać i z C++ z modułami inne języki nie będą miały szans.
Re: Moduły c++
#309729
Author: AK
Date: Sat, 30 Jun 2018 12:22
17 lines
1070 bytes
On 2018-06-30 13:56, Borneq wrote:

> https://gcc.gnu.org/wiki/cxx-modules
[...]
> module;

No super!. (40 lat i "już' są :)

> teraz jak widzę, brakuje tylko modułów biblioteki standardowej

Heh.. "tylko" :)

> Teraz tylko czekać i z C++ z modułami inne języki nie będą miały szans.

Whehehe :)

AK
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads