Skip to content

Instantly share code, notes, and snippets.

View carmel4a's full-sized avatar

Kamil Lewan carmel4a

View GitHub Profile
sudo apt-get install g++ autotools-dev autoconf automake libtool pkg-config libdb4.8-dev libdb4.8++-dev build-essential bsdmainutils python3 libssl-dev libevent-dev libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libminiupnpc-dev libzmq3-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler libqrencode-dev
template< class T, class V=void, class ...Args >
auto create( V v, Args... args ) -> T&
{
childs.emplace_back( std::make_unique< T >( v, args... ) );
}
gfx::geometrybank_handle geometry_bank;
geometry_bank = { GfxRenderer.Create_Bank() };
scene::shape_node shape;
shape.get_data().rangesquared_min = 0;
shape.get_data().rangesquared_max = 1000'000;
shape.get_data().material = GfxRenderer.Fetch_Material( "grass/grass04" );
shape.get_data().translucent = false;
auto shape1 = scene::shape_node( shape );
gfx::geometrybank_handle geometry_bank;
geometry_bank = { GfxRenderer.Create_Bank() };
scene::shape_node shape;
shape.get_data().rangesquared_min = 0;
shape.get_data().rangesquared_max = 1000'000;
shape.get_data().material = GfxRenderer.Fetch_Material( "grass/grass04" );
shape.get_data().translucent = false;
auto shape1 = scene::shape_node( shape );
gfx::geometrybank_handle geometry_bank;
geometry_bank = { GfxRenderer.Create_Bank() };
scene::shape_node shape;
shape.get_data().rangesquared_min = 0;
shape.get_data().rangesquared_max = 1000'000;
shape.get_data().material = GfxRenderer.Fetch_Material( "grass/grass04" );
shape.get_data().translucent = false;
auto shape1 = scene::shape_node( shape );
/** a.h */
#include "f_decl.h" // here're forward declrs
#include "b.h" // needed for `Aa` member. Can't be incomplete type.
namespace A
{
const int a = 10;
const int b = 200;
class Aa
{
Bb b; // must have definition
@carmel4a
carmel4a / a.cpp
Last active October 19, 2018 08:33
#include <iostream>
#include <vector>
int main()
{
std::vector< std::string> names;
std::vector< int> scores;
std::string name;
int score;
// definition - with `{}`
(1) Post processed cpp file.
// From header
class Foo // definition
{
void f(); // declaration
};
// From implementation file
void Foo::f() // definition
namespace N
{
template< class T >
foo( T& t );
class Base
{
int x;
int y;
};
class entity
{
int max_hp;
int hp;
int dmg;
int level;
};
class player : public entity
{