From 66eaba1caec239595daafe37db421d0b3f67907d Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Tue, 8 Sep 2020 19:45:40 +0300 Subject: [PATCH] Initial commit --- .gitattributes | 96 ++++++++++++ .travis.yml | 256 +++++++++++++++++++++++++++++++ README.md | 18 ++- appveyor.yml | 43 ++++++ doc/.gitignore | 1 + doc/Jamfile | 21 +++ doc/describe-docinfo-footer.html | 6 + doc/describe.adoc | 20 +++ doc/describe/copyright.adoc | 12 ++ doc/describe/overview.adoc | 24 +++ doc/describe/reference.adoc | 24 +++ include/boost/describe.hpp | 8 + index.html | 15 ++ meta/libraries.json | 14 ++ test/Jamfile | 13 ++ test/quick.cpp | 11 ++ 16 files changed, 580 insertions(+), 2 deletions(-) create mode 100644 .gitattributes create mode 100644 .travis.yml create mode 100644 appveyor.yml create mode 100644 doc/.gitignore create mode 100644 doc/Jamfile create mode 100644 doc/describe-docinfo-footer.html create mode 100644 doc/describe.adoc create mode 100644 doc/describe/copyright.adoc create mode 100644 doc/describe/overview.adoc create mode 100644 doc/describe/reference.adoc create mode 100644 include/boost/describe.hpp create mode 100644 index.html create mode 100644 meta/libraries.json create mode 100644 test/Jamfile create mode 100644 test/quick.cpp diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..3e84d7c --- /dev/null +++ b/.gitattributes @@ -0,0 +1,96 @@ +* text=auto !eol svneol=native#text/plain +*.gitattributes text svneol=native#text/plain + +# Scriptish formats +*.bat text svneol=native#text/plain +*.bsh text svneol=native#text/x-beanshell +*.cgi text svneol=native#text/plain +*.cmd text svneol=native#text/plain +*.js text svneol=native#text/javascript +*.php text svneol=native#text/x-php +*.pl text svneol=native#text/x-perl +*.pm text svneol=native#text/x-perl +*.py text svneol=native#text/x-python +*.sh eol=lf svneol=LF#text/x-sh +configure eol=lf svneol=LF#text/x-sh + +# Image formats +*.bmp binary svneol=unset#image/bmp +*.gif binary svneol=unset#image/gif +*.ico binary svneol=unset#image/ico +*.jpeg binary svneol=unset#image/jpeg +*.jpg binary svneol=unset#image/jpeg +*.png binary svneol=unset#image/png +*.tif binary svneol=unset#image/tiff +*.tiff binary svneol=unset#image/tiff +*.svg text svneol=native#image/svg%2Bxml + +# Data formats +*.pdf binary svneol=unset#application/pdf +*.avi binary svneol=unset#video/avi +*.doc binary svneol=unset#application/msword +*.dsp text svneol=crlf#text/plain +*.dsw text svneol=crlf#text/plain +*.eps binary svneol=unset#application/postscript +*.gz binary svneol=unset#application/gzip +*.mov binary svneol=unset#video/quicktime +*.mp3 binary svneol=unset#audio/mpeg +*.ppt binary svneol=unset#application/vnd.ms-powerpoint +*.ps binary svneol=unset#application/postscript +*.psd binary svneol=unset#application/photoshop +*.rdf binary svneol=unset#text/rdf +*.rss text svneol=unset#text/xml +*.rtf binary svneol=unset#text/rtf +*.sln text svneol=native#text/plain +*.swf binary svneol=unset#application/x-shockwave-flash +*.tgz binary svneol=unset#application/gzip +*.vcproj text svneol=native#text/xml +*.vcxproj text svneol=native#text/xml +*.vsprops text svneol=native#text/xml +*.wav binary svneol=unset#audio/wav +*.xls binary svneol=unset#application/vnd.ms-excel +*.zip binary svneol=unset#application/zip + +# Text formats +.htaccess text svneol=native#text/plain +*.bbk text svneol=native#text/xml +*.cmake text svneol=native#text/plain +*.css text svneol=native#text/css +*.dtd text svneol=native#text/xml +*.htm text svneol=native#text/html +*.html text svneol=native#text/html +*.ini text svneol=native#text/plain +*.log text svneol=native#text/plain +*.mak text svneol=native#text/plain +*.qbk text svneol=native#text/plain +*.rst text svneol=native#text/plain +*.sql text svneol=native#text/x-sql +*.txt text svneol=native#text/plain +*.xhtml text svneol=native#text/xhtml%2Bxml +*.xml text svneol=native#text/xml +*.xsd text svneol=native#text/xml +*.xsl text svneol=native#text/xml +*.xslt text svneol=native#text/xml +*.xul text svneol=native#text/xul +*.yml text svneol=native#text/plain +boost-no-inspect text svneol=native#text/plain +CHANGES text svneol=native#text/plain +COPYING text svneol=native#text/plain +INSTALL text svneol=native#text/plain +Jamfile text svneol=native#text/plain +Jamroot text svneol=native#text/plain +Jamfile.v2 text svneol=native#text/plain +Jamrules text svneol=native#text/plain +Makefile* text svneol=native#text/plain +README text svneol=native#text/plain +TODO text svneol=native#text/plain + +# Code formats +*.c text svneol=native#text/plain +*.cpp text svneol=native#text/plain +*.h text svneol=native#text/plain +*.hpp text svneol=native#text/plain +*.ipp text svneol=native#text/plain +*.tpp text svneol=native#text/plain +*.jam text svneol=native#text/plain +*.java text svneol=native#text/plain diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..342c939 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,256 @@ +# Copyright 2016-2020 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +language: cpp + +branches: + only: + - master + - develop + - /feature\/.*/ + +env: + matrix: + - BOGUS_JOB=true + +matrix: + + exclude: + - env: BOGUS_JOB=true + + include: + - os: linux + compiler: g++-5 + env: TOOLSET=gcc CXXSTD=14,1z + addons: + apt: + packages: + - g++-5 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: g++-6 + env: TOOLSET=gcc CXXSTD=14,1z + addons: + apt: + packages: + - g++-6 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: g++-7 + env: TOOLSET=gcc CXXSTD=14,17 + addons: + apt: + packages: + - g++-7 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: g++-8 + env: TOOLSET=gcc CXXSTD=14,17,2a + addons: + apt: + packages: + - g++-8 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: g++-9 + env: TOOLSET=gcc CXXSTD=14,17,2a + addons: + apt: + packages: + - g++-9 + sources: + - ubuntu-toolchain-r-test + + - os: linux + dist: bionic + compiler: g++-10 + env: TOOLSET=gcc CXXSTD=14,17,2a + addons: + apt: + packages: + - g++-10 + sources: + - ubuntu-toolchain-r-test + + - os: linux + dist: bionic + compiler: g++-10 + env: UBSAN=1 TOOLSET=gcc CXXSTD=14,17,2a UBSAN_OPTIONS=print_stacktrace=1 LINKFLAGS=-fuse-ld=gold + addons: + apt: + packages: + - g++-10 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: clang++-3.5 + env: TOOLSET=clang CXXSTD=14,1z + addons: + apt: + packages: + - clang-3.5 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: clang++-3.6 + env: TOOLSET=clang CXXSTD=14,1z + addons: + apt: + packages: + - clang-3.6 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: clang++-3.7 + env: TOOLSET=clang CXXSTD=14,1z + addons: + apt: + packages: + - clang-3.7 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: clang++-3.8 + env: TOOLSET=clang CXXSTD=14,1z + addons: + apt: + packages: + - clang-3.8 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: clang++-3.9 + env: TOOLSET=clang CXXSTD=14,1z + addons: + apt: + packages: + - clang-3.9 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: clang++-4.0 + env: TOOLSET=clang CXXSTD=14,1z + addons: + apt: + packages: + - clang-4.0 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: clang++-5.0 + env: TOOLSET=clang CXXSTD=14,1z + addons: + apt: + packages: + - clang-5.0 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: clang++-6.0 + env: TOOLSET=clang CXXSTD=14,17 + addons: + apt: + packages: + - clang-6.0 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: clang++-7 + env: TOOLSET=clang CXXSTD=14,17,2a + addons: + apt: + packages: + - clang-7 + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-xenial-7 + + - os: linux + compiler: clang++-8 + env: TOOLSET=clang CXXSTD=14,17,2a + addons: + apt: + packages: + - clang-8 + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-xenial-8 + + - os: linux + dist: xenial + compiler: clang++-9 + env: TOOLSET=clang CXXSTD=14,17,2a + addons: + apt: + packages: + - clang-9 + sources: + - ubuntu-toolchain-r-test + - sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main' + key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key' + + - os: linux + dist: xenial + compiler: clang++-10 + env: TOOLSET=clang CXXSTD=14,17,2a + addons: + apt: + packages: + - clang-10 + sources: + - ubuntu-toolchain-r-test + - sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-10 main' + key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key' + + - os: linux + dist: trusty + compiler: clang++-libc++ + env: TOOLSET=clang CXXSTD=14,1z + addons: + apt: + packages: + - libc++-dev + + - os: osx + compiler: clang++ + env: TOOLSET=clang COMPILER=clang++ CXXSTD=14,1z + + +install: + - BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true + - cd .. + - git clone -b $BOOST_BRANCH https://github.com/boostorg/boost.git boost-root + - cd boost-root + - git submodule update --init tools/boostdep + - mkdir -p libs/describe + - cp -r $TRAVIS_BUILD_DIR/* libs/describe + - python tools/boostdep/depinst/depinst.py describe + - ./bootstrap.sh + - ./b2 headers + +script: + - |- + echo "using $TOOLSET : : $TRAVIS_COMPILER ;" > ~/user-config.jam + - ./b2 libs/describe/test toolset=$TOOLSET cxxstd=$CXXSTD variant=debug,release + +notifications: + email: + on_success: always diff --git a/README.md b/README.md index cdc95af..418129c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,16 @@ -# describe -A C++ reflection library +# Describe + +A C++14 reflection library. + +## Supported Compilers + +* g++ 5 or later with `-std=c++14` or above +* clang++ 3.5 or later with `-std=c++14` or above +* Visual Studio 2015, 2017, 2019 + +Tested on [Travis](https://travis-ci.org/github/pdimov/describe/) and +[Appveyor](https://ci.appveyor.com/project/pdimov/describe). + +## License + +Distributed under the [Boost Software License, Version 1.0](http://boost.org/LICENSE_1_0.txt). diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..bdf7066 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,43 @@ +# Copyright 2016-2020 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) + +version: 1.0.{build}-{branch} + +shallow_clone: true + +branches: + only: + - master + - develop + - /feature\/.*/ + +environment: + matrix: + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + TOOLSET: msvc-14.0 + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + TOOLSET: msvc-14.1,clang-win + CXXSTD: 14,17 + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + TOOLSET: msvc-14.2 + CXXSTD: 14,17 + +install: + - set BOOST_BRANCH=develop + - if "%APPVEYOR_REPO_BRANCH%" == "master" set BOOST_BRANCH=master + - cd .. + - git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root + - cd boost-root + - git submodule update --init tools/boostdep + - xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\describe\ + - python tools/boostdep/depinst/depinst.py describe + - cmd /c bootstrap + - b2 -d0 headers + +build: off + +test_script: + - if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD% + - if not "%ADDRMD%" == "" set ADDRMD=address-model=%ADDRMD% + - b2 -j3 libs/describe/test toolset=%TOOLSET% %CXXSTD% %ADDRMD% variant=debug,release diff --git a/doc/.gitignore b/doc/.gitignore new file mode 100644 index 0000000..334f513 --- /dev/null +++ b/doc/.gitignore @@ -0,0 +1 @@ +/pdf/ diff --git a/doc/Jamfile b/doc/Jamfile new file mode 100644 index 0000000..a8d1c29 --- /dev/null +++ b/doc/Jamfile @@ -0,0 +1,21 @@ +# Copyright 2017, 2018 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# https://www.boost.org/LICENSE_1_0.txt + +import asciidoctor ; + +html describe.html : describe.adoc ; + +install html_ : describe.html : html ; + +pdf describe.pdf : describe.adoc ; +explicit describe.pdf ; + +install pdf_ : describe.pdf : pdf ; +explicit pdf_ ; + +############################################################################### +alias boostdoc ; +explicit boostdoc ; +alias boostrelease : html_ ; +explicit boostrelease ; diff --git a/doc/describe-docinfo-footer.html b/doc/describe-docinfo-footer.html new file mode 100644 index 0000000..d0d391a --- /dev/null +++ b/doc/describe-docinfo-footer.html @@ -0,0 +1,6 @@ + diff --git a/doc/describe.adoc b/doc/describe.adoc new file mode 100644 index 0000000..d9736ef --- /dev/null +++ b/doc/describe.adoc @@ -0,0 +1,20 @@ +//// +Copyright 2020 Peter Dimov +Distributed under the Boost Software License, Version 1.0. +https://www.boost.org/LICENSE_1_0.txt +//// + +# Describe: A {cpp}14 Reflection Library +Peter Dimov +:toc: left +:toclevels: 4 +:idprefix: +:docinfo: private-footer + +:leveloffset: +1 + +include::describe/overview.adoc[] +include::describe/reference.adoc[] +include::describe/copyright.adoc[] + +:leveloffset: -1 diff --git a/doc/describe/copyright.adoc b/doc/describe/copyright.adoc new file mode 100644 index 0000000..35ad50f --- /dev/null +++ b/doc/describe/copyright.adoc @@ -0,0 +1,12 @@ +//// +Copyright 2020 Peter Dimov +Distributed under the Boost Software License, Version 1.0. +https://www.boost.org/LICENSE_1_0.txt +//// + +[#copyright] +# Copyright and License +:idprefix: + +This documentation is copyright 2020 Peter Dimov and is distributed under +the http://www.boost.org/LICENSE_1_0.txt[Boost Software License, Version 1.0]. diff --git a/doc/describe/overview.adoc b/doc/describe/overview.adoc new file mode 100644 index 0000000..16d9490 --- /dev/null +++ b/doc/describe/overview.adoc @@ -0,0 +1,24 @@ +//// +Copyright 2020 Peter Dimov +Distributed under the Boost Software License, Version 1.0. +https://www.boost.org/LICENSE_1_0.txt +//// + +[#overview] +# Overview +:idprefix: overview_ + +## Description + +## Usage Examples + +## Dependencies + +## Supported Compilers + +* GCC 5 or later with `-std=c++14` or above +* Clang 3.5 or later with `-std=c++14` or above +* Visual Studio 2015, 2017, 2019 + +Tested on https://travis-ci.org/github/pdimov/describe[Travis] and +https://ci.appveyor.com/project/pdimov/describe[Appveyor]. diff --git a/doc/describe/reference.adoc b/doc/describe/reference.adoc new file mode 100644 index 0000000..17bd71e --- /dev/null +++ b/doc/describe/reference.adoc @@ -0,0 +1,24 @@ +//// +Copyright 2020 Peter Dimov +Distributed under the Boost Software License, Version 1.0. +https://www.boost.org/LICENSE_1_0.txt +//// + +[#reference] +# Reference +:idprefix: ref_ + +## + +### Synopsis + +``` +namespace boost { +namespace describe { + +// ... + +} // namespace describe +} // namespace boost +``` + diff --git a/include/boost/describe.hpp b/include/boost/describe.hpp new file mode 100644 index 0000000..37de664 --- /dev/null +++ b/include/boost/describe.hpp @@ -0,0 +1,8 @@ +#ifndef BOOST_DESCRIBE_HPP_INCLUDED +#define BOOST_DESCRIBE_HPP_INCLUDED + +// Copyright 2020 Peter Dimov +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt + +#endif // #ifndef BOOST_DESCRIBE_HPP_INCLUDED diff --git a/index.html b/index.html new file mode 100644 index 0000000..f566665 --- /dev/null +++ b/index.html @@ -0,0 +1,15 @@ + + + + + +Automatic redirection failed, please go to +doc/html/describe.html. + + + diff --git a/meta/libraries.json b/meta/libraries.json new file mode 100644 index 0000000..6da90d0 --- /dev/null +++ b/meta/libraries.json @@ -0,0 +1,14 @@ +{ + "key": "describe", + "name": "Describe", + "authors": [ + "Peter Dimov" + ], + "maintainers": [ + "Peter Dimov " + ], + "description": "A C++14 reflection library.", + "category": [ + "Metaprogramming" + ] +} diff --git a/test/Jamfile b/test/Jamfile new file mode 100644 index 0000000..3fe8da7 --- /dev/null +++ b/test/Jamfile @@ -0,0 +1,13 @@ +# Copyright 2020 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# https://www.boost.org/LICENSE_1_0.txt + +import testing ; + +project : requirements + extra + msvc:on + clang:on + gcc:on ; + +run quick.cpp ; diff --git a/test/quick.cpp b/test/quick.cpp new file mode 100644 index 0000000..65e6fe2 --- /dev/null +++ b/test/quick.cpp @@ -0,0 +1,11 @@ +// Copyright 2020 Peter Dimov +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt + +#include +#include + +int main() +{ + return boost::report_errors(); +}