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 <cereal/cereal.hpp> | |
| #include <cereal/archives/json.hpp> | |
| #include <cereal/types/vector.hpp> | |
| #include <cereal/types/unordered_map.hpp> | |
| #include <cereal/types/string.hpp> | |
| #include <cereal/types/boost_variant.hpp> | |
| using variant_data_type = boost::make_recursive_variant | |
| < std::string | |
| , std::uint8_t, std::uint16_t, std::uint32_t, std::uint64_t |
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 <cereal/cereal.hpp> | |
| #include <cereal/archives/json.hpp> | |
| #include <limits> | |
| #include <cstint> | |
| #include <iostream> | |
| auto main() -> int | |
| { | |
| cereal::JSONOutputArchive( std::cout )( std::numeric_limits< std::uint64_t >::max() ); | |
| } |
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
| // glm ライブラリーの glm::u8vec4 など必要に応じて読み替える | |
| struct rgba_pixel { std::uint8_t r, g, b, a; }; | |
| // デコードされたRGBAピクセルの塊と必要最低限の画像情報を保持する型 | |
| struct decoded_image_type | |
| { | |
| int width; | |
| int height; | |
| int elements; | |
| std::vector< rgba_pixel > data; |
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
| cmake_minimum_required( VERSION 3.2 ) | |
| include_directories(${CMAKE_CURRENT_BINARY_DIR}/include) | |
| link_directories(${CMAKE_CURRENT_BINARY_DIR}/lib) | |
| include( ExternalProject ) | |
| set( sqlite3_source_path ${CMAKE_CURRENT_BINARY_DIR}/external/sqlite3/src/external_sqlite3/ ) | |
| set( sqlite3_cmake_file_path ${sqlite3_source_path}/CMakeLists.txt ) |
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
| cmake_minimum_required( VERSION 3.2 ) | |
| include_directories(${CMAKE_CURRENT_BINARY_DIR}/include) | |
| link_directories(${CMAKE_CURRENT_BINARY_DIR}/lib) | |
| include( ExternalProject ) | |
| ExternalProject_Add( external_libwebp | |
| # https://github.com/webmproject/libwebp | |
| # http://www.webmproject.org/ |
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
| static volatile constexpr char mojimoji[] = "abcd1234"; | |
| static volatile constexpr unsigned char mojisize = sizeof( mojimoji ); | |
| #include <iostream> | |
| auto main() -> int | |
| { | |
| std::cout << ( const char* )mojimoji << " " << std::to_string( mojisize ); | |
| } |
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
| if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) | |
| if( CMAKE_CXX_COMPILER_VERION VERSION_GREATER 3.5 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 3.5 ) | |
| set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1z" ) | |
| elseif( CMAKE_CXX_COMPILER_VERION VERSION_GREATER 3.2 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 3.2 ) | |
| set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y" ) | |
| else() | |
| set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" ) |
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
| git diff --shortstat --exit-code --quiet |
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
| function sudo() | |
| { | |
| command=$1 | |
| shift | |
| powershell -Command Start-Process -Verb runas ${command} { $@ } | |
| } |
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
| 2016-01-25T15:30:15.123+09:00 |