mirror of
https://github.com/boostorg/describe.git
synced 2026-01-20 16:32:36 +00:00
Compare commits
30 Commits
feature/en
...
boost-1.87
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3da6a1e295 | ||
|
|
ff76bbb90b | ||
|
|
18e7c01359 | ||
|
|
777bdec2e9 | ||
|
|
f39d32150d | ||
|
|
f8f7af29d5 | ||
|
|
89b5caef8d | ||
|
|
2fb95498ea | ||
|
|
8a0ade0ad0 | ||
|
|
1508f66184 | ||
|
|
ac298922b0 | ||
|
|
86099f1d78 | ||
|
|
d25e48348e | ||
|
|
76c036a2d7 | ||
|
|
879d4b2a22 | ||
|
|
202203112b | ||
|
|
882b168de8 | ||
|
|
1ddee6c39a | ||
|
|
9899acb4c9 | ||
|
|
84ce044885 | ||
|
|
120b9edaed | ||
|
|
50719b2123 | ||
|
|
8f3b04a3d9 | ||
|
|
2e63564776 | ||
|
|
9da33c4629 | ||
|
|
fad199e782 | ||
|
|
e005f6950c | ||
|
|
2e5dcc80b2 | ||
|
|
ba1459ac84 | ||
|
|
c89e4dd3db |
@@ -32,6 +32,8 @@ local linux_pipeline(name, image, environment, packages = "", sources = [], arch
|
||||
commands:
|
||||
[
|
||||
'set -e',
|
||||
'uname -a',
|
||||
'echo $DRONE_STAGE_MACHINE',
|
||||
'wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -',
|
||||
] +
|
||||
(if sources != [] then [ ('apt-add-repository "' + source + '"') for source in sources ] else []) +
|
||||
@@ -186,6 +188,27 @@ local windows_pipeline(name, image, environment, arch = "amd64") =
|
||||
"g++-12",
|
||||
),
|
||||
|
||||
linux_pipeline(
|
||||
"Linux 23.04 GCC 13",
|
||||
"cppalliance/droneubuntu2304:1",
|
||||
{ TOOLSET: 'gcc', COMPILER: 'g++-13', CXXSTD: '03,11,14,17,20,2b' },
|
||||
"g++-13",
|
||||
),
|
||||
|
||||
linux_pipeline(
|
||||
"Linux 24.04 GCC 14 UBSAN",
|
||||
"cppalliance/droneubuntu2404:1",
|
||||
{ TOOLSET: 'gcc', COMPILER: 'g++-14', CXXSTD: '03,11,14,17,20,2b' } + ubsan,
|
||||
"g++-14",
|
||||
),
|
||||
|
||||
linux_pipeline(
|
||||
"Linux 24.04 GCC 14 ASAN",
|
||||
"cppalliance/droneubuntu2404:1",
|
||||
{ TOOLSET: 'gcc', COMPILER: 'g++-14', CXXSTD: '03,11,14,17,20,2b' } + asan,
|
||||
"g++-14",
|
||||
),
|
||||
|
||||
linux_pipeline(
|
||||
"Linux 16.04 Clang 3.5",
|
||||
"cppalliance/droneubuntu1604:1",
|
||||
@@ -303,18 +326,62 @@ local windows_pipeline(name, image, environment, arch = "amd64") =
|
||||
"cppalliance/droneubuntu2204:1",
|
||||
{ TOOLSET: 'clang', COMPILER: 'clang++-15', CXXSTD: '03,11,14,17,20,2b' },
|
||||
"clang-15",
|
||||
["deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main"],
|
||||
),
|
||||
|
||||
linux_pipeline(
|
||||
"Linux 23.04 Clang 16",
|
||||
"cppalliance/droneubuntu2304:1",
|
||||
{ TOOLSET: 'clang', COMPILER: 'clang++-16', CXXSTD: '03,11,14,17,20,2b' },
|
||||
"clang-16",
|
||||
),
|
||||
|
||||
linux_pipeline(
|
||||
"Linux 23.10 Clang 17",
|
||||
"cppalliance/droneubuntu2310:1",
|
||||
{ TOOLSET: 'clang', COMPILER: 'clang++-17', CXXSTD: '03,11,14,17,20,2b' },
|
||||
"clang-17",
|
||||
),
|
||||
|
||||
linux_pipeline(
|
||||
"Linux 24.04 Clang 18 UBSAN",
|
||||
"cppalliance/droneubuntu2404:1",
|
||||
{ TOOLSET: 'clang', COMPILER: 'clang++-18', CXXSTD: '03,11,14,17,20,2b' } + ubsan,
|
||||
"clang-18",
|
||||
),
|
||||
|
||||
linux_pipeline(
|
||||
"Linux 24.04 Clang 18 ASAN",
|
||||
"cppalliance/droneubuntu2404:1",
|
||||
{ TOOLSET: 'clang', COMPILER: 'clang++-18', CXXSTD: '03,11,14,17,20,2b' } + asan,
|
||||
"clang-18",
|
||||
),
|
||||
|
||||
macos_pipeline(
|
||||
"MacOS 10.15 Xcode 12.2",
|
||||
{ TOOLSET: 'clang', COMPILER: 'clang++', CXXSTD: '03,11,14,1z' },
|
||||
"MacOS 10.15 Xcode 12.2 UBSAN",
|
||||
{ TOOLSET: 'clang', COMPILER: 'clang++', CXXSTD: '03,11,14,1z' } + ubsan,
|
||||
),
|
||||
|
||||
macos_pipeline(
|
||||
"MacOS 10.15 Xcode 12.2 ASAN",
|
||||
{ TOOLSET: 'clang', COMPILER: 'clang++', CXXSTD: '03,11,14,1z' } + asan,
|
||||
),
|
||||
|
||||
macos_pipeline(
|
||||
"MacOS 12.4 Xcode 13.4.1 UBSAN",
|
||||
{ TOOLSET: 'clang', COMPILER: 'clang++', CXXSTD: '03,11,14,17,20,2b' } + ubsan,
|
||||
xcode_version = "13.4.1", osx_version = "monterey", arch = "arm64",
|
||||
),
|
||||
|
||||
macos_pipeline(
|
||||
"MacOS 12.4 Xcode 13.4.1 ASAN",
|
||||
{ TOOLSET: 'clang', COMPILER: 'clang++', CXXSTD: '03,11,14,17,20,2b' } + asan,
|
||||
xcode_version = "13.4.1", osx_version = "monterey", arch = "arm64",
|
||||
),
|
||||
|
||||
windows_pipeline(
|
||||
"Windows VS2015 msvc-14.0",
|
||||
"cppalliance/dronevs2015",
|
||||
{ TOOLSET: 'msvc-14.0', CXXSTD: '14,latest' },
|
||||
{ TOOLSET: 'msvc-14.0', CXXSTD: '14,latest', B2_DONT_EMBED_MANIFEST: '1' },
|
||||
),
|
||||
|
||||
windows_pipeline(
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
# https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
set -ex
|
||||
export PATH=~/.local/bin:/usr/local/bin:$PATH
|
||||
|
||||
DRONE_BUILD_DIR=$(pwd)
|
||||
|
||||
|
||||
83
.github/workflows/ci.yml
vendored
83
.github/workflows/ci.yml
vendored
@@ -19,18 +19,18 @@ jobs:
|
||||
include:
|
||||
- toolset: gcc-4.8
|
||||
cxxstd: "03,11"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:18.04
|
||||
os: ubuntu-latest
|
||||
install: g++-4.8
|
||||
- toolset: gcc-5
|
||||
cxxstd: "03,11,14,14-gnu,1z,1z-gnu"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:18.04
|
||||
os: ubuntu-latest
|
||||
install: g++-5
|
||||
- toolset: gcc-6
|
||||
cxxstd: "03,11,14,14-gnu,1z,1z-gnu"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:18.04
|
||||
os: ubuntu-latest
|
||||
install: g++-6
|
||||
- toolset: gcc-7
|
||||
cxxstd: "03,11,14,14-gnu,17,17-gnu"
|
||||
@@ -56,26 +56,31 @@ jobs:
|
||||
install: g++-12
|
||||
- toolset: gcc-13
|
||||
cxxstd: "03,11,14,17,20,2b"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:23.04
|
||||
os: ubuntu-latest
|
||||
install: g++-13
|
||||
- toolset: gcc-14
|
||||
cxxstd: "03,11,14,17,20,2b"
|
||||
container: ubuntu:24.04
|
||||
os: ubuntu-latest
|
||||
install: g++-14
|
||||
- toolset: clang
|
||||
compiler: clang++-3.9
|
||||
cxxstd: "03,11,14"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:18.04
|
||||
os: ubuntu-latest
|
||||
install: clang-3.9
|
||||
- toolset: clang
|
||||
compiler: clang++-4.0
|
||||
cxxstd: "03,11,14"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:18.04
|
||||
os: ubuntu-latest
|
||||
install: clang-4.0
|
||||
- toolset: clang
|
||||
compiler: clang++-5.0
|
||||
cxxstd: "03,11,14,1z"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:18.04
|
||||
os: ubuntu-latest
|
||||
install: clang-5.0
|
||||
- toolset: clang
|
||||
compiler: clang++-6.0
|
||||
@@ -115,33 +120,48 @@ jobs:
|
||||
- toolset: clang
|
||||
compiler: clang++-13
|
||||
cxxstd: "03,11,14,17,20,2b"
|
||||
os: ubuntu-22.04
|
||||
container: ubuntu:22.04
|
||||
os: ubuntu-latest
|
||||
install: clang-13
|
||||
- toolset: clang
|
||||
compiler: clang++-14
|
||||
cxxstd: "03,11,14,17,20,2b"
|
||||
os: ubuntu-22.04
|
||||
container: ubuntu:22.04
|
||||
os: ubuntu-latest
|
||||
install: clang-14
|
||||
- toolset: clang
|
||||
compiler: clang++-15
|
||||
cxxstd: "03,11,14,17,20,2b"
|
||||
os: ubuntu-22.04
|
||||
container: ubuntu:22.04
|
||||
os: ubuntu-latest
|
||||
install: clang-15
|
||||
- toolset: clang
|
||||
compiler: clang++-16
|
||||
cxxstd: "03,11,14,17,20,2b"
|
||||
os: ubuntu-latest
|
||||
container: ubuntu:23.04
|
||||
os: ubuntu-latest
|
||||
install: clang-16
|
||||
- toolset: clang
|
||||
cxxstd: "03,11,14,17,2a"
|
||||
os: macos-11
|
||||
- toolset: clang
|
||||
compiler: clang++-17
|
||||
cxxstd: "03,11,14,17,20,2b"
|
||||
os: macos-12
|
||||
container: ubuntu:23.10
|
||||
os: ubuntu-latest
|
||||
install: clang-17
|
||||
- toolset: clang
|
||||
compiler: clang++-18
|
||||
cxxstd: "03,11,14,17,20,2b"
|
||||
container: ubuntu:24.04
|
||||
os: ubuntu-latest
|
||||
install: clang-18
|
||||
- toolset: clang
|
||||
cxxstd: "03,11,14,17,20,2b"
|
||||
os: macos-13
|
||||
- toolset: clang
|
||||
cxxstd: "03,11,14,17,20,2b"
|
||||
os: macos-14
|
||||
- toolset: clang
|
||||
cxxstd: "03,11,14,17,20,2b"
|
||||
os: macos-15
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
container: ${{matrix.container}}
|
||||
@@ -151,6 +171,10 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
steps:
|
||||
- name: Enable Node 16
|
||||
run: |
|
||||
echo "ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup container environment
|
||||
@@ -237,7 +261,7 @@ jobs:
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Boost
|
||||
shell: cmd
|
||||
@@ -275,14 +299,15 @@ jobs:
|
||||
include:
|
||||
- os: ubuntu-20.04
|
||||
- os: ubuntu-22.04
|
||||
- os: macos-11
|
||||
- os: macos-12
|
||||
- os: ubuntu-24.04
|
||||
- os: macos-13
|
||||
- os: macos-14
|
||||
- os: macos-15
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install packages
|
||||
if: matrix.install
|
||||
@@ -323,14 +348,15 @@ jobs:
|
||||
include:
|
||||
- os: ubuntu-20.04
|
||||
- os: ubuntu-22.04
|
||||
- os: macos-11
|
||||
- os: macos-12
|
||||
- os: ubuntu-24.04
|
||||
- os: macos-13
|
||||
- os: macos-14
|
||||
- os: macos-15
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install packages
|
||||
if: matrix.install
|
||||
@@ -381,14 +407,15 @@ jobs:
|
||||
include:
|
||||
- os: ubuntu-20.04
|
||||
- os: ubuntu-22.04
|
||||
- os: macos-11
|
||||
- os: macos-12
|
||||
- os: ubuntu-24.04
|
||||
- os: macos-13
|
||||
- os: macos-14
|
||||
- os: macos-15
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install packages
|
||||
if: matrix.install
|
||||
@@ -441,7 +468,7 @@ jobs:
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Boost
|
||||
shell: cmd
|
||||
@@ -490,7 +517,7 @@ jobs:
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Boost
|
||||
shell: cmd
|
||||
@@ -557,7 +584,7 @@ jobs:
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Boost
|
||||
shell: cmd
|
||||
|
||||
20
build.jam
Normal file
20
build.jam
Normal file
@@ -0,0 +1,20 @@
|
||||
# Copyright 2023-2024 René Ferdinand Rivera Morell
|
||||
# Copyright 2024 Peter Dimov
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
require-b2 5.2 ;
|
||||
|
||||
constant boost_dependencies :
|
||||
/boost/mp11//boost_mp11
|
||||
;
|
||||
|
||||
project /boost/describe ;
|
||||
|
||||
explicit
|
||||
[ alias boost_describe : : : : <include>include <library>$(boost_dependencies) ]
|
||||
[ alias all : boost_describe test ]
|
||||
;
|
||||
|
||||
call-if : boost-library describe
|
||||
;
|
||||
@@ -263,6 +263,11 @@ The presence of private members is taken as an indication that
|
||||
a universal conversion is not suitable, so the overload is
|
||||
disabled in this case using `std::enable_if_t`.
|
||||
|
||||
NOTE: Since release 1.81.0, Boost.JSON provides its
|
||||
own, built-in, support for described classes. Consequently,
|
||||
when using Boost 1.81.0 or later, you don't need the below
|
||||
`tag_invoke` function.
|
||||
|
||||
[source]
|
||||
----
|
||||
include::../../example/to_json.cpp[lines=5..-1]
|
||||
@@ -282,6 +287,11 @@ Like the previous example, but in the other direction. Defines
|
||||
a `tag_invoke` overload that converts a `boost::json::value` to
|
||||
an annotated struct.
|
||||
|
||||
NOTE: Since release 1.81.0, Boost.JSON provides its
|
||||
own, built-in, support for described classes. Consequently,
|
||||
when using Boost 1.81.0 or later, you don't need the below
|
||||
`tag_invoke` function.
|
||||
|
||||
[source]
|
||||
----
|
||||
include::../../example/from_json.cpp[lines=5..-1]
|
||||
|
||||
@@ -18,7 +18,7 @@ template<class T> struct fmt::formatter<T, char, std::enable_if_t<
|
||||
|
||||
if( it != end && *it != '}' )
|
||||
{
|
||||
ctx.error_handler().on_error( "invalid format" );
|
||||
throw_format_error( "invalid format" );
|
||||
}
|
||||
|
||||
return it;
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
|
||||
if( i1 != i2 )
|
||||
{
|
||||
ctx.error_handler().on_error( "invalid format" );
|
||||
throw_format_error( "invalid format" );
|
||||
}
|
||||
|
||||
return i1;
|
||||
|
||||
@@ -5,11 +5,14 @@
|
||||
#include <boost/describe.hpp>
|
||||
#include <boost/mp11.hpp>
|
||||
#include <boost/json.hpp>
|
||||
#include <boost/version.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
namespace app
|
||||
{
|
||||
|
||||
#if BOOST_VERSION < 108100
|
||||
|
||||
template<class T> void extract( boost::json::object const & obj, char const * name, T & value )
|
||||
{
|
||||
value = boost::json::value_to<T>( obj.at( name ) );
|
||||
@@ -36,6 +39,8 @@ template<class T,
|
||||
return t;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
struct A
|
||||
{
|
||||
int x;
|
||||
|
||||
@@ -34,7 +34,7 @@ template<class C1, class C2, class R, class... A>
|
||||
|
||||
template<class C>
|
||||
boost::json::value
|
||||
call( C & c, boost::string_view method, boost::json::value const & args )
|
||||
call( C & c, boost::string_view method, boost::json::array const & args )
|
||||
{
|
||||
using Fd = boost::describe::describe_members<C,
|
||||
boost::describe::mod_public | boost::describe::mod_function>;
|
||||
@@ -46,7 +46,7 @@ template<class C>
|
||||
|
||||
if( !found && method == D.name)
|
||||
{
|
||||
result = call_impl( c, D.pointer, args.as_array() );
|
||||
result = call_impl( c, D.pointer, args );
|
||||
found = true;
|
||||
}
|
||||
|
||||
@@ -80,6 +80,6 @@ BOOST_DESCRIBE_STRUCT(Object, (), (greet, add))
|
||||
int main()
|
||||
{
|
||||
Object obj;
|
||||
std::cout << call( obj, "greet", {{ "world" }} ) << std::endl;
|
||||
std::cout << call( obj, "add", {{ 1, 2 }} ) << std::endl;
|
||||
std::cout << call( obj, "greet", { "world" } ) << std::endl;
|
||||
std::cout << call( obj, "add", { 1, 2 } ) << std::endl;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <boost/describe.hpp>
|
||||
#include <boost/mp11.hpp>
|
||||
#include <boost/json.hpp>
|
||||
#include <boost/version.hpp>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
@@ -12,6 +13,8 @@
|
||||
namespace app
|
||||
{
|
||||
|
||||
#if BOOST_VERSION < 108100
|
||||
|
||||
template<class T,
|
||||
class D1 = boost::describe::describe_members<T,
|
||||
boost::describe::mod_public | boost::describe::mod_protected>,
|
||||
@@ -29,6 +32,8 @@ template<class T,
|
||||
});
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
struct A
|
||||
{
|
||||
int x;
|
||||
|
||||
@@ -30,24 +30,18 @@ template<class C, class B> struct base_descriptor
|
||||
template<class C, class B> constexpr unsigned base_descriptor<C, B>::modifiers;
|
||||
#endif
|
||||
|
||||
template<class... T> auto base_descriptor_fn_impl( int, T... )
|
||||
// bases_descriptor
|
||||
template<typename ...>
|
||||
struct bases_descriptor_impl;
|
||||
|
||||
template<class C, class ...Bs>
|
||||
struct bases_descriptor_impl<C, list<Bs...>>
|
||||
{
|
||||
return list<T...>();
|
||||
}
|
||||
|
||||
#define BOOST_DESCRIBE_BASE_IMPL(C, B) , boost::describe::detail::base_descriptor<C, B>()
|
||||
|
||||
#if defined(_MSC_VER) && !defined(__clang__)
|
||||
using type = list<base_descriptor<C, Bs>...>;
|
||||
};
|
||||
|
||||
#define BOOST_DESCRIBE_BASES(C, ...) inline auto boost_base_descriptor_fn( C** ) \
|
||||
{ return boost::describe::detail::base_descriptor_fn_impl( 0 BOOST_DESCRIBE_PP_FOR_EACH(BOOST_DESCRIBE_BASE_IMPL, C, __VA_ARGS__) ); }
|
||||
|
||||
#else
|
||||
|
||||
#define BOOST_DESCRIBE_BASES(C, ...) inline auto boost_base_descriptor_fn( C** ) \
|
||||
{ return boost::describe::detail::base_descriptor_fn_impl( 0 BOOST_DESCRIBE_PP_FOR_EACH(BOOST_DESCRIBE_BASE_IMPL, C, ##__VA_ARGS__) ); }
|
||||
|
||||
#endif
|
||||
{ return typename boost::describe::detail::bases_descriptor_impl<C, boost::describe::detail::list<__VA_ARGS__>>::type(); }
|
||||
|
||||
} // namespace detail
|
||||
} // namespace describe
|
||||
|
||||
20
test/Jamfile
20
test/Jamfile
@@ -4,11 +4,16 @@
|
||||
|
||||
import testing ;
|
||||
|
||||
local WERROR = <toolset>msvc:<warnings-as-errors>on <toolset>clang:<warnings-as-errors>on <toolset>gcc:<warnings-as-errors>on ;
|
||||
|
||||
project : requirements
|
||||
<library>/boost/describe//boost_describe
|
||||
<library>/boost/container_hash//boost_container_hash
|
||||
<library>/boost/core//boost_core
|
||||
<library>/boost/variant2//boost_variant2
|
||||
|
||||
<warnings>extra
|
||||
<toolset>msvc:<warnings-as-errors>on
|
||||
<toolset>clang:<warnings-as-errors>on
|
||||
<toolset>gcc:<warnings-as-errors>on
|
||||
$(WERROR)
|
||||
<toolset>clang:<cxxflags>"-Wno-unused-private-field" ;
|
||||
|
||||
run quick.cpp ;
|
||||
@@ -87,8 +92,8 @@ explicit describe_cxx14 ;
|
||||
|
||||
local CXX14 = [ check-target-builds describe_cxx14 describe_cxx14 : : <build>no ] "<toolset>msvc-14.0:<cxxflags>-wd4100" ;
|
||||
|
||||
local JSON = <library>/boost//json/<warnings>off "<toolset>msvc-14.2:<cxxflags>-wd5104" ;
|
||||
local SERIALIZATION = <library>/boost//serialization/<warnings>off "-<toolset>gcc:<warnings-as-errors>on" "-<toolset>clang:<warnings-as-errors>on" ;
|
||||
local JSON = <library>/boost/json//boost_json/<warnings>off "<toolset>msvc-14.2:<cxxflags>-wd5104" <undefined-sanitizer>norecover:<link>static ;
|
||||
local SERIALIZATION = <library>/boost/serialization//boost_serialization/<warnings>off -$(WERROR) <undefined-sanitizer>norecover:<link>static ;
|
||||
|
||||
run ../example/printing_enums_ct.cpp : : : $(CXX14) ;
|
||||
run ../example/printing_enums_rt.cpp : : : $(CXX14) ;
|
||||
@@ -98,9 +103,10 @@ run ../example/print_function.cpp : : : $(CXX14) ;
|
||||
run ../example/to_json.cpp : : : $(CXX14) $(JSON) ;
|
||||
run ../example/from_json.cpp : : : $(CXX14) $(JSON) ;
|
||||
run ../example/serialization.cpp : : : $(CXX14) $(SERIALIZATION) ;
|
||||
run ../example/json_rpc.cpp : : : $(CXX14) $(JSON) ;
|
||||
run ../example/json_rpc.cpp : : : $(CXX14) $(JSON) <library>/boost/utility//boost_utility
|
||||
"<toolset>gcc-14,<cxxstd>14:<build>no" ; # mysterious segmentation fault
|
||||
run ../example/hash_value.cpp : : : $(CXX14) ;
|
||||
run ../example/equality.cpp : : : $(CXX14) ;
|
||||
link ../example/console.cpp : $(CXX14) $(JSON) ;
|
||||
link ../example/console.cpp : $(CXX14) $(JSON) <library>/boost/utility//boost_utility ;
|
||||
run ../example/struct_to_tuple.cpp : : : $(CXX14) ;
|
||||
run ../example/pm_to_string.cpp : : : $(CXX14) ;
|
||||
|
||||
@@ -62,6 +62,14 @@ int main() {}
|
||||
|
||||
#include <boost/mp11.hpp>
|
||||
|
||||
template<typename ...Bases>
|
||||
struct ZT: Bases...
|
||||
{
|
||||
BOOST_DESCRIBE_CLASS(ZT, (Bases...), (), (), ());
|
||||
};
|
||||
|
||||
using Z = ZT<X1, X2, X3>;
|
||||
|
||||
int main()
|
||||
{
|
||||
using namespace boost::describe;
|
||||
@@ -151,6 +159,21 @@ int main()
|
||||
BOOST_TEST_EQ( (mp_at_c<L, 1>::modifiers), mod_private | mod_virtual );
|
||||
}
|
||||
|
||||
{
|
||||
using L = describe_bases<Z, mod_any_access>;
|
||||
|
||||
BOOST_TEST_EQ( mp_size<L>::value, 3 );
|
||||
|
||||
BOOST_TEST_TRAIT_SAME( typename mp_at_c<L, 0>::type, X1 );
|
||||
BOOST_TEST_EQ( (mp_at_c<L, 0>::modifiers), mod_public );
|
||||
|
||||
BOOST_TEST_TRAIT_SAME( typename mp_at_c<L, 1>::type, X2 );
|
||||
BOOST_TEST_EQ( (mp_at_c<L, 1>::modifiers), mod_public );
|
||||
|
||||
BOOST_TEST_TRAIT_SAME( typename mp_at_c<L, 2>::type, X3 );
|
||||
BOOST_TEST_EQ( (mp_at_c<L, 2>::modifiers), mod_public );
|
||||
}
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,4 +14,4 @@ target_link_libraries(main Boost::describe)
|
||||
enable_testing()
|
||||
add_test(main main)
|
||||
|
||||
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
|
||||
add_custom_target(check VERBATIM COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $<CONFIG>)
|
||||
|
||||
@@ -20,4 +20,4 @@ target_link_libraries(quick Boost::describe Boost::core)
|
||||
enable_testing()
|
||||
add_test(quick quick)
|
||||
|
||||
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure --no-tests=error -C $<CONFIG>)
|
||||
add_custom_target(check VERBATIM COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure --no-tests=error -C $<CONFIG>)
|
||||
|
||||
Reference in New Issue
Block a user