News for hackers. Stuff that matters.
Re:C++17 constexpr everything, or as much as the compiler can by mehrdadn on Thursday December 28, 2017 @04:42PM (#16025130)
> It is expected that some corners of the language will never be available at compile time, for example I/O.

So you're saying functions that have side-effects like I/O can actually perform those operations at compile-time if marked with constexpr?

Re:C++17 constexpr everything, or as much as the compiler can by Joky on Thursday December 28, 2017 @08:48PM (#16026879)
No: the purpose of constexpr is that the compiler would issue an error if a constexpr function contains such side-effects.
Re:C++17 constexpr everything, or as much as the compiler can by mehrdadn on Thursday December 28, 2017 @08:51PM (#16026892)
No? Wouldn't it do that with a static_assert invoking the function too?
Re:C++17 constexpr everything, or as much as the compiler can by Joky on Monday January 08, 2018 @11:36AM (#16097856)
No sure I get the question: static_assert can only invoke constexpr functions, and constexpr functions can only call themselves other constexpr functions. Since IO functions are not constexpr, you can't call them there.