This file contains hidden or 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
| #pragma once | |
| /* This code tries to follow in some instance the following specification for optional type : | |
| * http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3793.html | |
| * Of course, it's also inspired by the reference TS implementation : | |
| * https://github.com/akrzemi1/Optional | |
| * This implementation do not aim to be the same quality, this is only a study exercise. | |
| * Also based on the cppreference page : http://en.cppreference.com/w/cpp/experimental/optional | |
| * It also does not bother with compatibility, and assumes a C++14 compiler. These omissions | |
| * leads to a somewhat cleaner code in some place. |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <script src="potato.js"></script> | |
| </head> | |
| <body onload="init();"> | |
| </body> | |
| </html> |
This file contains hidden or 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 CTTI_HXX | |
| #define CTTI_HXX | |
| #include <ConstString.hxx> | |
| #include <Platform.hxx> | |
| #include <StaticString.hxx> | |
| template<class T> | |
| class CTTI | |
| { |
This file contains hidden or 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 CONST_STRING_HXX | |
| #define CONST_STRING_HXX | |
| #include <algorithm> | |
| #include <cstddef> | |
| #include <stdexcept> | |
| #include <gsl_assert.h> | |
| #include <ArrayIteratorPolicy.hxx> |
This file contains hidden or 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 ITERATABLE_ENUM_HXX | |
| #define ITERATABLE_ENUM_HXX | |
| #include <exception> | |
| #include <type_traits> | |
| #include <string> | |
| #include <sstream> | |
| #include <utility> | |
| /* A simple set of functionnality aiming to emulate an interatable enum. |
This file contains hidden or 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
| #pragma once | |
| #error This file need modification on linux, be aware of this. Once you made it, you can delete this error. | |
| #include <cstdint> | |
| #include <Windows.h> | |
| #include <winnt.h> | |
| #ifdef DLL_EXPORT |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <script src="potato.js"></script> | |
| </head> | |
| <body onload="init();"> | |
| </body> | |
| </html> |
This file contains hidden or 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 com.chartgen; | |
| import java.awt.Graphics2D; | |
| import java.io.ByteArrayOutputStream; | |
| import java.io.File; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| //import java.util.Arrays; | |
| import java.util.List; | |
| import javax.imageio.ImageIO; |
This file contains hidden or 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<type_traits> | |
| // I generally use this metafunction to show how useful the SFINAE is in metaprogramming. | |
| namespace | |
| { | |
| template<class T> | |
| struct constexpr_validator | |
| { | |
| static constexpr T m_{}; |
This file contains hidden or 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 <functional> | |
| #include <tuple> | |
| #include <type_traits> | |
| // Actually, a subtle bug may arise when the function is using index_constant as parameter. | |
| // For this reason, a more correct implementation should define a specialized class, hidden in a namespace, | |
| // and forbid the use in other places. | |
| // An easier, more correct, but more verbose way would be to just define two different classes for the argument list | |
| // and the bounded arguments, to avoid the confusion with the index_constant bracket operator overload. |