Skip to content

Commit b77b328

Browse files
committed
chore: add polystore
close #10
1 parent 40c11fd commit b77b328

34 files changed

Lines changed: 1481 additions & 649 deletions

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,9 @@ set(BOOST_SRC_DIR ${DEFAULT_BOOST_SRC_DIR} CACHE STRING "Boost source dir to use
5454
#-------------------------------------------------
5555
# The boost super-project requires one explicit dependency per-line.
5656
set(BOOST_RTS_DEPENDENCIES
57+
Boost::assert
5758
Boost::config
58-
Boost::container_hash
5959
Boost::core
60-
Boost::mp11
6160
Boost::system
6261
Boost::throw_exception)
6362

include/boost/rts.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#ifndef BOOST_RTS_HPP
1111
#define BOOST_RTS_HPP
1212

13-
#include <boost/rts/context.hpp>
14-
#include <boost/rts/service.hpp>
13+
#include <boost/rts/polystore.hpp>
1514

1615
#endif

include/boost/rts/brotli/decode.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ using metadata_chunk_func = void (*)(void* opaque, const std::uint8_t* data, std
4646

4747
/** Provides the Brotli decompression API */
4848
struct BOOST_SYMBOL_VISIBLE
49-
decode_service
50-
: public service
49+
decode_service
5150
{
5251
virtual bool
5352
set_parameter(
@@ -120,7 +119,7 @@ decode_service
120119

121120
BOOST_RTS_DECL
122121
decode_service&
123-
install_decode_service(context& ctx);
122+
install_decode_service(polystore& ctx);
124123

125124
} // brotli
126125
} // rts

include/boost/rts/brotli/encode.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ enum constants
7979

8080
/** Provides the Brotli compression API */
8181
struct BOOST_SYMBOL_VISIBLE
82-
encode_service
83-
: public service
82+
encode_service
8483
{
8584
virtual bool
8685
set_parameter(
@@ -168,7 +167,7 @@ encode_service
168167

169168
BOOST_RTS_DECL
170169
encode_service&
171-
install_encode_service(context& ctx);
170+
install_encode_service(polystore& ctx);
172171

173172
} // brotli
174173
} // rts

include/boost/rts/brotli/shared_dictionary.hpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
#ifndef BOOST_RTS_BROTLI_SHARED_DICTIONARY_HPP
1111
#define BOOST_RTS_BROTLI_SHARED_DICTIONARY_HPP
1212

13+
#include <boost/rts/detail/config.hpp>
1314
#include <boost/rts/brotli/types.hpp>
14-
#include <boost/rts/context_fwd.hpp>
15-
#include <boost/rts/service.hpp>
15+
#include <boost/rts/polystore_fwd.hpp>
1616

1717
namespace boost {
1818
namespace rts {
@@ -30,8 +30,7 @@ enum class shared_dictionary_type
3030

3131
/** Provides the Brotli shared_dictionary API */
3232
struct BOOST_SYMBOL_VISIBLE
33-
shared_dictionary_service
34-
: public service
33+
shared_dictionary_service
3534
{
3635
#if 0
3736
virtual shared_dictionary*
@@ -55,7 +54,7 @@ shared_dictionary_service
5554

5655
BOOST_RTS_DECL
5756
shared_dictionary_service&
58-
install_shared_dictionary_service(context& ctx);
57+
install_shared_dictionary_service(polystore& ctx);
5958

6059
} // brotli
6160
} // rts

include/boost/rts/context.hpp

Lines changed: 0 additions & 148 deletions
This file was deleted.
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
//
2+
// Copyright (c) 2025 Vinnie Falco (vinnie dot falco at gmail dot com)
3+
//
4+
// Distributed under the Boost Software License, Version 1.0. (See accompanying
5+
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6+
//
7+
// Official repository: https://github.com/cppalliance/rts
8+
//
9+
10+
#ifndef BOOST_RTS_DETAIL_CALL_TRAITS_HPP
11+
#define BOOST_RTS_DETAIL_CALL_TRAITS_HPP
12+
13+
#include <boost/rts/detail/type_traits.hpp>
14+
#include <type_traits>
15+
16+
namespace boost {
17+
namespace rts {
18+
namespace detail {
19+
20+
template<class... Ts> struct type_list {};
21+
22+
template<class T, class = void>
23+
struct call_traits : std::false_type
24+
{
25+
};
26+
27+
template<class R, class... Args>
28+
struct call_traits<R(*)(Args...)> : std::true_type
29+
{
30+
using return_type = R;
31+
using arg_types = type_list<Args...>;
32+
};
33+
34+
template<class R, class... Args>
35+
struct call_traits<R(&)(Args...)> : std::true_type
36+
{
37+
using return_type = R;
38+
using arg_types = type_list<Args...>;
39+
};
40+
41+
template<class C, class R, class... Args>
42+
struct call_traits<R(C::*)(Args...)> : std::true_type
43+
{
44+
using class_type = C;
45+
using return_type = R ;
46+
using arg_types = type_list<Args...>;
47+
};
48+
49+
template<class C, class R, class... Args>
50+
struct call_traits<R(C::*)(Args...) const> : std::true_type
51+
{
52+
using class_type = C;
53+
using return_type = R ;
54+
using arg_types = type_list<Args...>;
55+
};
56+
57+
template<class F>
58+
struct call_traits<F, typename std::enable_if<
59+
std::is_member_function_pointer<decltype(
60+
&F::operator())>::value>::type>
61+
: call_traits<decltype(&F::operator())>
62+
{
63+
};
64+
65+
template<class T, class R, class ArgList, class = void>
66+
struct is_invocable_impl : std::false_type {};
67+
68+
template<class T, class R, class... Args>
69+
struct is_invocable_impl<
70+
T, R, type_list<Args...>,
71+
void_t<decltype(std::declval<T>()(
72+
std::declval<Args>()...))>>
73+
: std::integral_constant<bool,
74+
call_traits<T>::value &&
75+
std::is_convertible<decltype(std::declval<T>()(
76+
std::declval<Args>()...)), R>::value>
77+
{
78+
};
79+
80+
template<class T, class R, class... Args>
81+
struct is_invocable
82+
: is_invocable_impl<T, R, type_list<Args...>>
83+
{
84+
};
85+
86+
} // detail
87+
} // rts
88+
} // boost
89+
90+
#endif
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
//
2+
// Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
3+
//
4+
// Distributed under the Boost Software License, Version 1.0. (See accompanying
5+
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6+
//
7+
// Official repository: https://github.com/cppalliance/rts
8+
//
9+
10+
#ifndef BOOST_RTS_DETAIL_EXCEPT_HPP
11+
#define BOOST_RTS_DETAIL_EXCEPT_HPP
12+
13+
#include <boost/rts/detail/config.hpp>
14+
#include <boost/assert/source_location.hpp>
15+
#include <boost/core/detail/string_view.hpp>
16+
17+
namespace boost {
18+
namespace rts {
19+
namespace detail {
20+
21+
BOOST_RTS_DECL void BOOST_NORETURN throw_bad_typeid(
22+
source_location const& loc = BOOST_CURRENT_LOCATION);
23+
24+
BOOST_RTS_DECL void BOOST_NORETURN throw_invalid_argument(
25+
core::string_view s = "invalid argument",
26+
source_location const& loc = BOOST_CURRENT_LOCATION);
27+
28+
BOOST_RTS_DECL void BOOST_NORETURN throw_logic_error(
29+
core::string_view s = "logic error",
30+
source_location const& loc = BOOST_CURRENT_LOCATION);
31+
32+
} // detail
33+
} // rts
34+
} // boost
35+
36+
#endif

0 commit comments

Comments
 (0)