Article View: pl.comp.lang.c
Article #309728Moduły c++
From: Borneq
Date: Sat, 30 Jun 2018 11:56
Date: Sat, 30 Jun 2018 11:56
32 lines
1625 bytes
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.
Technical Details
Message-ID:
<ph7r52$ris$1@node2.news.atman.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail From: Borneq <borneq@antyspam.hidden.pl> Newsgroups: pl.comp.lang.c Subject: Moduły c++ Date: Sat, 30 Jun 2018 13:56:18 +0200 Organization: ATMAN - ATM S.A. Lines: 32 Message-ID: <ph7r52$ris$1@node2.news.atman.pl> NNTP-Posting-Host: public-gprs630544.centertel.pl Mime-Version: 1.0 X-Trace: node2.news.atman.pl 1530359778 28252 5.184.6.81 (30 Jun 2018 11:56:18 GMT) X-Complaints-To: usenet@atman.pl NNTP-Posting-Date: Sat, 30 Jun 2018 11:56:18 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 X-Mozilla-News-Host: news://news.atman.pl:119 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit