├── .editorconfig ├── .gitattributes ├── .gitignore ├── .gitmodules ├── .tgitconfig ├── CMakeLists.txt ├── LICENSE.txt ├── README.md ├── _project └── CodeBlocks │ ├── nonstd-lite.cbp │ └── nonstd-lite.workspace ├── _vcpkg └── ports │ └── nonstd-lite │ ├── CONTROL │ ├── portfile.cmake │ └── usage └── script ├── t-lite.bat ├── tc-cl-lite.bat ├── tc-lite.bat └── tg-lite.bat /.editorconfig: -------------------------------------------------------------------------------- 1 | # Configuration file for EditorConfig, see https://EditorConfig.org 2 | 3 | # Ignore any other files further up in the file system 4 | root = true 5 | 6 | # All files: 7 | [*] 8 | # Let git determine line ending: end_of_line = lf 9 | charset = utf-8 10 | indent_size = 4 11 | indent_style = space 12 | insert_final_newline = true 13 | trim_trailing_whitespace = true 14 | 15 | # Markdown files: keep trailing space-pair as line-break 16 | [*.md] 17 | trim_trailing_whitespace = false 18 | 19 | # Python scripts: 20 | [*.py] 21 | 22 | # YAML scripts: 23 | [*.yml] 24 | indent_size = 2 25 | 26 | # Makefiles: Tab indentation (no size specified) 27 | [Makefile] 28 | indent_style = tab 29 | 30 | # C, C++ source files: 31 | [*.{h,hpp,c,cpp}] 32 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for CodeBlocks 5 | *.cbp text eol=lf 6 | *.workspace text eol=lf 7 | 8 | # Custom for Visual Studio 9 | *.cs diff=csharp 10 | *.sln merge=union 11 | *.csproj merge=union 12 | *.vbproj merge=union 13 | *.fsproj merge=union 14 | *.dbproj merge=union 15 | 16 | # Standard to msysgit 17 | *.doc diff=astextplain 18 | *.DOC diff=astextplain 19 | *.docx diff=astextplain 20 | *.DOCX diff=astextplain 21 | *.dot diff=astextplain 22 | *.DOT diff=astextplain 23 | *.pdf diff=astextplain 24 | *.PDF diff=astextplain 25 | *.rtf diff=astextplain 26 | *.RTF diff=astextplain 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | 19 | # Compiled Static libraries 20 | *.lai 21 | *.la 22 | *.a 23 | *.lib 24 | 25 | # Executables 26 | *.exe 27 | *.out 28 | *.app 29 | 30 | # Buck 31 | /buck-out/ 32 | /.buckd/ 33 | /buckaroo/ 34 | .buckconfig.local 35 | BUCKAROO_DEPS 36 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "any"] 2 | path = any 3 | url = https://github.com/martinmoene/any-lite 4 | branch = master 5 | [submodule "byte"] 6 | path = byte 7 | url = https://github.com/martinmoene/byte-lite 8 | branch = master 9 | [submodule "expected"] 10 | path = expected 11 | url = https://github.com/martinmoene/expected-lite 12 | branch = master 13 | [submodule "observer-ptr"] 14 | path = observer-ptr 15 | url = https://github.com/martinmoene/observer-ptr-lite 16 | branch = master 17 | [submodule "optional"] 18 | path = optional 19 | url = https://github.com/martinmoene/optional-lite 20 | branch = master 21 | [submodule "ring-span"] 22 | path = ring-span 23 | url = https://github.com/martinmoene/ring-span-lite 24 | branch = master 25 | [submodule "span"] 26 | path = span 27 | url = https://github.com/martinmoene/span-lite 28 | branch = master 29 | [submodule "status-value"] 30 | path = status-value 31 | url = https://github.com/martinmoene/status-value-lite 32 | branch = master 33 | [submodule "string-view"] 34 | path = string-view 35 | url = https://github.com/martinmoene/string-view-lite 36 | branch = master 37 | [submodule "value-ptr"] 38 | path = value-ptr 39 | url = https://github.com/martinmoene/value-ptr-lite 40 | branch = master 41 | [submodule "variant"] 42 | path = variant 43 | url = https://github.com/martinmoene/variant-lite 44 | branch = master 45 | -------------------------------------------------------------------------------- /.tgitconfig: -------------------------------------------------------------------------------- 1 | [bugtraq] 2 | url = https://github.com/martinmoene/nonstd-lite/issues/%BUGID% 3 | number = true 4 | logregex = "(\\s*(,|and)?\\s*#\\d+)+\n(\\d+)" 5 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2019 by Martin Moene 2 | # 3 | # https://github.com/martinmoene/nonstd-lite 4 | # 5 | # Distributed under the Boost Software License, Version 1.0. 6 | # (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 7 | 8 | cmake_minimum_required( VERSION 3.5 ) 9 | 10 | # nonstd-lite project and version: 11 | 12 | project( 13 | nonstd_lite 14 | VERSION 0.1.0 15 | # DESCRIPTION "A collection of C++17-like types for C++98, C++11 and later as single-file header-only libraries" 16 | # HOMEPAGE_URL "https://github.com/martinmoene/nonstd-lite" 17 | LANGUAGES CXX ) 18 | 19 | add_subdirectory( any ) 20 | add_subdirectory( byte ) 21 | add_subdirectory( expected ) 22 | add_subdirectory( observer-ptr ) 23 | add_subdirectory( optional ) 24 | add_subdirectory( ring-span ) 25 | add_subdirectory( span ) 26 | add_subdirectory( status-value ) 27 | add_subdirectory( string-view ) 28 | add_subdirectory( value-ptr ) 29 | add_subdirectory( variant ) 30 | 31 | # end of file 32 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Boost Software License - Version 1.0 - August 17th, 2003 2 | 3 | Permission is hereby granted, free of charge, to any person or organization 4 | obtaining a copy of the software and accompanying documentation covered by 5 | this license (the "Software") to use, reproduce, display, distribute, 6 | execute, and transmit the Software, and to prepare derivative works of the 7 | Software, and to permit third-parties to whom the Software is furnished to 8 | do so, all subject to the following: 9 | 10 | The copyright notices in the Software and this entire statement, including 11 | the above license grant, this restriction and the following disclaimer, 12 | must be included in all copies of the Software, in whole or in part, and 13 | all derivative works of the Software, unless such copies or derivative 14 | works are solely in the form of machine-executable object code generated by 15 | a source language processor. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 20 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 21 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 22 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # nonstd-lite 2 | Parent of *-lite repositories 3 | -------------------------------------------------------------------------------- /_project/CodeBlocks/nonstd-lite.cbp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 | 13 | 14 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /_project/CodeBlocks/nonstd-lite.workspace: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /_vcpkg/ports/nonstd-lite/CONTROL: -------------------------------------------------------------------------------- 1 | Source: nonstd-lite 2 | Version: 1.0.0 3 | Description: Mostly vocabulary types backported to earlier versions of C++ 4 | Build-Depends: any-lite, byte-lite, expected-lite, observer-ptr-lite, optional-lite, ring-span-lite, span-lite, string-view-lite, variant-lite 5 | 6 | # status-value-lite, 7 | # value-ptr-lite, 8 | -------------------------------------------------------------------------------- /_vcpkg/ports/nonstd-lite/portfile.cmake: -------------------------------------------------------------------------------- 1 | set(VCPKG_POLICY_EMPTY_PACKAGE enabled) 2 | -------------------------------------------------------------------------------- /_vcpkg/ports/nonstd-lite/usage: -------------------------------------------------------------------------------- 1 | The package nonstd-lite is compatible with built-in CMake targets: 2 | 3 | find_package(nonstd-lite REQUIRED [COMPONENTS ...]) 4 | target_link_libraries(main PRIVATE ${Boost_LIBRARIES}) 5 | target_include_directories(main PRIVATE ${Boost_INCLUDE_DIRS}) 6 | 7 | 8 | TODO ^^^^^^^^ 9 | -------------------------------------------------------------------------------- /script/t-lite.bat: -------------------------------------------------------------------------------- 1 | @echo off & setlocal enableextensions enabledelayedexpansion 2 | :: 3 | :: tg-lite-msys.bat - compile & run tests (GNUC). 4 | :: 5 | 6 | set SCRIPT_DIR=%~dp0 7 | 8 | ::active-lite 9 | ::endian-lite 10 | ::invoke-lite 11 | ::nonstd-lite 12 | ::typetag-lite 13 | set FOLDERS=any-lite atomic-lite bit-lite boolean-lite byte-lite expected-lite jthread-lite observer-ptr-lite optional-fun-lite optional-lite ring-span-lite scope-lite span-lite status-value-lite string-lite string-view-lite type-lite value-ptr-lite variant-lite 14 | 15 | for %%d in (%FOLDERS%) do ( 16 | echo. 17 | echo ============== 18 | echo %%d: 19 | cd %SCRIPT_DIR%../../%%d/test 20 | call t.bat 21 | ) 22 | 23 | endlocal & goto :EOF 24 | -------------------------------------------------------------------------------- /script/tc-cl-lite.bat: -------------------------------------------------------------------------------- 1 | @echo off & setlocal enableextensions enabledelayedexpansion 2 | :: 3 | :: tg-lite-msys.bat - compile & run tests (GNUC). 4 | :: 5 | 6 | set SCRIPT_DIR=%~dp0 7 | 8 | ::active-lite 9 | ::endian-lite 10 | ::invoke-lite 11 | ::nonstd-lite 12 | ::typetag-lite 13 | set FOLDERS=any-lite atomic-lite bit-lite boolean-lite byte-lite expected-lite jthread-lite observer-ptr-lite optional-fun-lite optional-lite ring-span-lite scope-lite span-lite status-value-lite string-lite string-view-lite type-lite value-ptr-lite variant-lite 14 | 15 | for %%d in (%FOLDERS%) do ( 16 | echo. 17 | echo ============== 18 | echo %%d: 19 | cd %SCRIPT_DIR%../../%%d/test 20 | call tc-cl.bat 21 | ) 22 | 23 | endlocal & goto :EOF 24 | -------------------------------------------------------------------------------- /script/tc-lite.bat: -------------------------------------------------------------------------------- 1 | @echo off & setlocal enableextensions enabledelayedexpansion 2 | :: 3 | :: tg-lite-msys.bat - compile & run tests (GNUC). 4 | :: 5 | 6 | set SCRIPT_DIR=%~dp0 7 | 8 | ::active-lite 9 | ::endian-lite 10 | ::invoke-lite 11 | ::nonstd-lite 12 | ::typetag-lite 13 | set FOLDERS=any-lite atomic-lite bit-lite boolean-lite byte-lite expected-lite jthread-lite observer-ptr-lite optional-fun-lite optional-lite ring-span-lite scope-lite span-lite status-value-lite string-lite string-view-lite type-lite value-ptr-lite variant-lite 14 | 15 | for %%d in (%FOLDERS%) do ( 16 | echo. 17 | echo ============== 18 | echo %%d: 19 | cd %SCRIPT_DIR%../../%%d/test 20 | call tc.bat 21 | ) 22 | 23 | endlocal & goto :EOF 24 | -------------------------------------------------------------------------------- /script/tg-lite.bat: -------------------------------------------------------------------------------- 1 | @echo off & setlocal enableextensions enabledelayedexpansion 2 | :: 3 | :: tg-lite-msys.bat - compile & run tests (GNUC). 4 | :: 5 | 6 | set SCRIPT_DIR=%~dp0 7 | 8 | ::active-lite 9 | ::endian-lite 10 | ::invoke-lite 11 | ::nonstd-lite 12 | ::typetag-lite 13 | set FOLDERS=any-lite atomic-lite bit-lite boolean-lite byte-lite expected-lite jthread-lite observer-ptr-lite optional-fun-lite optional-lite ring-span-lite scope-lite span-lite status-value-lite string-lite string-view-lite type-lite value-ptr-lite variant-lite 14 | 15 | for %%d in (%FOLDERS%) do ( 16 | echo. 17 | echo ============== 18 | echo %%d: 19 | cd %SCRIPT_DIR%../../%%d/test 20 | call tg.bat 21 | ) 22 | 23 | endlocal & goto :EOF 24 | --------------------------------------------------------------------------------