C++ Logo


Advanced search

Re: [isocpp-ext] Can we expect that all C++ source files can have the same suffix?

From: Peter Dimov <pdimov_at_[hidden]>
Date: Tue, 19 Apr 2022 11:37:19 +0300
Tom Honermann wrote:
> With respect to Nico's concerns, I'm not very concerned about the ability to
> compile a bunch of source files together in a single command line invocation.
> I'm much more concerned about the ability to compile a single TU that imports
> (portions of) the standard library. If, going forward, a build system is required
> to compile the following example because it is necessary to prebuild modules
> for the standard library using whatever compiler options are being used to
> compile a single source file into an executable, then I think we'll have done the
> C++ community quite a disservice.
> import std;
> int main(int argc, char **argv) {
> std::cout << "Hello!\n";
> }

I agree that it would be nice for this to work without requiring a build system.

Furthermore, I also think that it would be nice for

import <iostream>;

to work without a build system, and

import <mylib/myheader.hpp>;

working without a build system wouldn't be that bad either.

Received on 2022-04-19 08:37:23