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
# Public domain, as per The Unlicense. NO WARRANTY. See https://unlicense.org | |
class_name NumberLimits | |
## Useful for dealing with numerical limits. | |
## Minimum positive 64-bit floating-point number > 0. | |
## [br]0x0000000000000001 | |
const FLOAT64_MIN_SUBNORMAL: float = 2.0**-1074 # ≈ 4.9406564584124654e-324 | |
## Maximum positive 64-bit floating-point subnormal number (min possible value in binary exponent). | |
## [br]0x000FFFFFFFFFFFFF |
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
cmake_minimum_required(VERSION 3.10) | |
include(ExternalProject) | |
ExternalProject_Add(fmtlib | |
GIT_REPOSITORY https://github.com/fmtlib/fmt.git | |
EXCLUDE_FROM_ALL TRUE | |
BUILD_COMMAND $(MAKE) fmt | |
STEP_TARGETS build) | |
set(fmtlib_BINARY_DIR "${CMAKE_BINARY_DIR}/fmtlib-prefix/src/fmtlib-build") | |
set(fmtlib_SOURCE_DIR "${CMAKE_BINARY_DIR}/fmtlib-prefix/src/fmtlib/include") | |
add_executable(fmttest fmttest.cpp) |
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
# Lets say we want to add a library and an executable, both with the same name. | |
# In this example, it is resman | |
add_library(resman ${src_cpps} ${src_hpps} ) | |
target_link_libraries(resman ${Boost_LIBRARIES} ${LIBYAML} ${LIBFMT}) | |
# | |
# Add resman executable | |
# | |
# We call the executable resman-bin | |
add_executable(resman-bin main.cpp ) |
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
local stringstream = {} | |
stringstream.__index = stringstream | |
function stringstream.create(str) | |
local out = setmetatable({}, stringstream) | |
out.buffer = str or "" | |
out.pos = 0 | |
out.__index = stringstream | |
return out |