This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
An example and framework on C/C++ API design and symbol visibility. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <sstream> | |
#include <vector> | |
#include <memory> | |
#include <functional> | |
#include <chrono> | |
#include <type_traits> | |
#include <thread> | |
#include <algorithm> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Testing new enum schemes in C++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*---------------------------------------------------------------------------------------------------- | |
* flist.h : Library header | |
*/ | |
#ifndef FLIST_H_ | |
#define FLIST_H_ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if 0 | |
To use, copy/paste and substitute LIBNAME with your library's name. | |
Names: | |
- Exported -> void function(); | |
- Imported -> extern void function(); | |
- Internal -> static function(); | |
[ API] Exported names, when compiling: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef TIMER_HPP_ | |
#define TIMER_HPP_ | |
#include <iosfwd> | |
#include <type_traits> | |
#include <chrono> | |
class Timer { | |
public: | |
using Clock = std::conditional< |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <chrono> | |
#include <thread> | |
#include <type_traits> | |
#include <vector> | |
#include <random> | |
#include <iomanip> | |
#include <array> | |
#include <algorithm> | |
#include <sstream> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef CIRCULAR_LIST_ | |
#define CIRCULAR_LIST_ | |
template <typename T> | |
class circular_list { | |
private: // static members | |
struct node { | |
public: // methods | |
node() = default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package seguradora.fuzzy.util; | |
import java.math.BigDecimal; | |
public class Limite { | |
private Number inferior; | |
private Number superior; | |
public Limite() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#define CAPACIDADE 5 | |
#define SIMNAO(_b_) ((_b_) ? "sim" : "não") | |
#define VALOR_PADRAO (0) | |
// Algumas notas acerca do uso dos índices primeiro e último: | |
// - f->primeiro é sempre um indice válido que vai de 0 a (CAPACIDADE - 1), | |
// apontando para o primeiro elemento da fila |