SFML community forums

General => Feature requests => Topic started by: jokoon on March 12, 2016, 02:49:59 pm

Title: C++ modules for SFML
Post by: jokoon on March 12, 2016, 02:49:59 pm
I've seen some video presentations of modules. It seems they're available in VS2015, and I guess they are also available with clang.

I just wanted to know if some of you guys tried them, and to poke around to see how cumbersome it would be to build sfml as modules (for VS2015 is seems to revolve around those .ifc files) for vs2015, clang or both. No idea if GCC support them though...

Reminder: modules essentially allows for much faster building times, and in some way are a "standardized" precompiled header.

Usually, instead of

#include <vector>
#include "SFML/Graphics.hpp"

you do

import std.vector
import sf.graphics

I did not try them yet, so I don't know how trivial it would be to use them for a library like SFML...

What do you think?
Title: Re: C++ modules for SFML
Post by: Nexus on March 12, 2016, 04:02:03 pm
Modules in C++ aren't standardized yet. They were expected for C++17, but it seems like they're not likely to make it [1 (https://botondballo.wordpress.com/2015/06/05/trip-report-c-standards-meeting-in-lenexa-may-2015/)].

Current module implementations are compiler-specific and experimental, and the effort to rewrite SFML is not justified, as long as the specification is not fixed yet.