« first day (3027 days earlier)      last day (1996 days later) » 

2:56 AM
Man this place is dead.
 
 
10 hours later…
12:56 PM
Wow premake is awesome :D
it's basically Cmake, but less complicated and equally powerful!
 
nwp
Can it generate visual studio project files?
 
 
2 hours later…
2:39 PM
@nwp yup
VisualStudio 2017, Xcode or GNU Make
 
nwp
Nice. Maybe I should look into it.
 
it's pretty neat
 
nwp
I'm very unhappy with cmake.
 
to generate all vs files it took me 70ms
70
ms
 
nwp
That's completely irrelevant.
 
2:41 PM
yeah. but If you think about it, cmake took a minute or so to do the same
@nwp I know though ahahah :D
 
nwp
What matters is that it gets dependencies between generated files correct. Cmake fails in that regard. I'd gladly add a couple of minutes to get a correct build system.
 
it's even more readable
workspace "Omge"
	architecture "x64"

	configurations
	{
		"Debug",
		"Release",
		"Distribution"
	}

fmt = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"

project "Core"
	location "Core"
	kind "SharedLib"
	language "C++"

	targetdir ("bin/" .. fmt .. "/%{prj.name}")
	objdir ("bin-int/" .. fmt .. "/%{prj.name}")

	files
	{
		"%{prj.name}/src/**.h",
		"%{prj.name}/src/**.cpp"
	}

	includedirs
	{
		"%{prj.name}/ext/spdlog/**.h"
	}

	filter "system:windows"
		cppdialect "C++17"
		staticruntime "On"
this is how I am using it
it's pretty straightforward!
 
user92578
 
user92578
How would I get that to compile?
 
user92578
Essentially I want to provide a basic lightweight constexpr alternative to a class, that can be converted to the actual type
 
user92578
2:44 PM
I made godbolt example with ints to keep it clear, actual use case is with std::string and std::string_view in the constant wrapper
 
user92578
I assume the issue is with the order the things are compiled, like static constexpr stuff happens before the nested struct is processed?
 
nwp
The output explains why it doesn't compile.
 
user92578
definition is not complete? I'm not sure I understand what that means
 
nwp
It can't compile Constant because that requires compiling IntegerValue which requires compiling One which requires ....
 
user92578
I see
 
nwp
2:47 PM
Just move it down to fix it: godbolt.org/z/Q3JSC2
 
user92578
hmm yeah I guess putting the constants into a separate namespace makes sense anyways
 
That's next level cpp for me
I've never used anything like that before..
 
nwp
I have done too much ::template stuff lately.
Fun fact: if you forget the template there clang crashes (sometimes).
 
user92578
I've been learning a lot about modern C++ stuff lately, I basically have a CppCon video on my third monitor during my service at all times
 
:D
I should actually learn more about modern cpp too
 
user92578
2:55 PM
constexpr is really cool
 
@nwp the only thing that I hate about Premake is that errors suck
they look like template errors in cpp
@Tyyppi_77 never used it before.. I might actually look into it
 
user92578
I've been running static analyzers this weekend, C++ Core Guidelines on Visual Studio and CppCheck, but damn are they slow
 
user92578
Haven't really decided how closely I'd want to follow the C++ Core Guidelines yet
 
3:50 PM
@DukeZhou are you alive?
 

« first day (3027 days earlier)      last day (1996 days later) »