Skip to content

Instantly share code, notes, and snippets.

View Manu343726's full-sized avatar

Manu Sánchez Manu343726

View GitHub Profile
@Manu343726
Manu343726 / examples.cmake
Last active August 4, 2020 21:22
Promote target to thirdparty
external_dependency(rttr https://github.com/rttrorg/rttr.git v0.9.6) 17 external_dependency(MetaStuff https://github.com/Manu343726/MetaStuff master) + 18 mark_as_external_target(rttr_core)
mark_as_external_target(rttr)
@Manu343726
Manu343726 / test_structs.h
Last active December 1, 2019 20:07
tinyrefl generated code example
#ifndef TEST_STRUCTS_H
#define TEST_STRUCTS_H
#include <string>
#include <vector>
#include <set>
namespace test_structs
{
enum class Enum
@Manu343726
Manu343726 / test_structs.h
Created December 1, 2019 20:00
tinyrefl generated code example
#ifndef TEST_STRUCTS_H
#define TEST_STRUCTS_H
#include <string>
#include <vector>
#include <set>
namespace test_structs
{
enum class Enum
@Manu343726
Manu343726 / using_value_ptr_lite_Jinja2Cpp.log
Created October 24, 2018 12:36
Jinja2Cpp conan build log
This file has been truncated, but you can view the full file.
Exporting package recipe
Linter warnings
WARN: Linter. Line 37: Undefined variable 'os'
WARN: Linter. Line 38: Undefined variable 'os'
WARN: Linter. Line 1: Unused tools imported from conans
jinja2cpp/master@Manu343726/testing: The stored package has not changed
Configuration:
[settings]
os=Linux
os_build=Linux
@Manu343726
Manu343726 / using_value_ptr_lite_0.1.0.log
Created October 24, 2018 12:31
Jinja2Cpp conan package build logs
This file has been truncated, but you can view the full file.
Exporting package recipe
Linter warnings
WARN: Linter. Line 37: Undefined variable 'os'
WARN: Linter. Line 38: Undefined variable 'os'
WARN: Linter. Line 1: Unused tools imported from conans
jinja2cpp/master@Manu343726/testing: The stored package has not changed
Configuration:
[settings]
os=Linux
os_build=Linux
@Manu343726
Manu343726 / build.log
Created October 23, 2018 16:02
Jinja2Cpp build failure with conan (variant-lite namespace issue)
This file has been truncated, but you can view the full file.
Exporting package recipe
Linter warnings
WARN: Linter. Line 37: Undefined variable 'os'
WARN: Linter. Line 38: Undefined variable 'os'
WARN: Linter. Line 1: Unused tools imported from conans
jinja2cpp/master@Manu343726/testing: The stored package has not changed
Configuration:
[settings]
os=Linux
os_build=Linux
@Manu343726
Manu343726 / gist:2d4523cb902a7919d45ec6d460a9f032
Created April 2, 2018 08:32
tinyrefl parser errors, no namespaces in global namespace found
Running with gitlab-runner 10.6.0 (a3543a27)
 on docker-auto-scale 72989761
Using Docker executor with image lasote/conangcc5 ...
Pulling docker image lasote/conangcc5 ...
Using docker image sha256:682660755d898a68a7b1d77543f2e736a6c554ccb436b5575057147871ec2f51 for lasote/conangcc5 ...
section_start:1522656548:prepare_script
Running on runner-72989761-project-5169630-concurrent-0 via runner-72989761-srm-1522656459-d4b13fb3...
section_end:1522656550:prepare_script
section_start:1522656550:get_sources
Cloning repository...
@Manu343726
Manu343726 / input.hpp
Created March 23, 2018 11:08
tinyrefl generated code example
#include <QObject>
namespace wmip
{
namespace testing
{
class MyInterface : public QObject
{
@Manu343726
Manu343726 / genericrunnable.cpp
Created February 14, 2018 09:13
Generic QRunnable implementation
// Java sucks, and importing design patterns from Java sucks even more.
//
// This template avoids writing one QRunnable derived class per use case
// by wrapping any C++ callable.
template<typename Function>
struct Task : public QRunnable, Function
{
template<typename... Args>
Task(Args&&... args) :
@Manu343726
Manu343726 / adl_sfinae.cpp
Created January 19, 2018 10:36
ADL-based SFINAE
namespace bitmasks_lib
{
std::false_type enableBitMaskOperators(type_tag<T>);
// use the result of this function as SFINAE predicate
template<typename T>
constexpr bool bitmaskOperatorsEnabled()
{
using bitmasks_lib::enableBitMaskOperators;
return decltype(enableBitMaskOperators(type_tag<T>()))::value;