Skip to content

Instantly share code, notes, and snippets.

// PNG_TO_DDS_RGBA_EXPORTER.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <fstream>
#include <cinttypes>
#include <vector>
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
//Given by beached from the include<c++> discord
// "if you want to be fancy, throw in a noexcept( std::is_nothrow_invokable_v<Function> )"
template<typename Function>
constexpr void do_n( size_t count, Function func ) {
while( count-- > 0 ) {
std::invoke( func );
}
}
std::vector<int> v{}
function(YTE_Source_Group aRoot aTarget)
get_target_property(targetBinaryDir ${aTarget} BINARY_DIR)
get_target_property(targetSourceDir ${aTarget} SOURCE_DIR)
get_target_property(targetSources ${aTarget} SOURCES)
# This will determine if the given files are in a folder or not and separate
# them on that alone.
foreach(aFile ${targetSources})
file(TO_CMAKE_PATH ${aFile} resultFile)
get_filename_component(nameComponent ${resultFile} NAME)
/mnt/c/ClangTesting/build/bin/clang++ -stdlib=libc++ -nostdinc++ -I/mnt/c/ClangTesting/build/include/c++/v1 -I/mnt/c/ClangTesting/build/include -L/mnt/c/ClangTesting/build/lib -Wl,-rpath,/mnt/c/ClangTesting/build/lib -Xclang -freflection -std=c++1z ReflectionTest.cpp
#include <iostream>
struct Test
{
int mNumber;
constexpr Test(int aNumber)
: mNumber(aNumber) {}
@playmer
playmer / Funny_ICE.cpp
Last active October 1, 2016 10:01
Gives an ICE in MSVC 2015, will probably remove more of this, it's problem is centered on the very ill-formed attempt at writing a correct Binding template to deduce the types of a member function pointer we have some knowledge of.
#include <stdio.h>
class Kiddo
{
};
class CrappyKid : public Kiddo
{