Skip to content

Commit

Permalink
Move declarations for #70.
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinH committed Jan 2, 2020
1 parent fc4699b commit 07306b7
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 37 deletions.
1 change: 1 addition & 0 deletions include/tao/json/basic_value.hpp
Expand Up @@ -26,6 +26,7 @@
#include "internal/single.hpp"
#include "internal/type_traits.hpp"

#include "binary.hpp"
#include "binary_view.hpp"
#include "forward.hpp"
#include "message_extension.hpp"
Expand Down
6 changes: 6 additions & 0 deletions include/tao/json/binary.hpp
Expand Up @@ -9,6 +9,12 @@

#include "external/pegtl/internal/always_false.hpp"

namespace tao
{
using binary = std::vector< std::byte >;

} // namespace tao

namespace tao::json
{
namespace internal
Expand Down
55 changes: 24 additions & 31 deletions include/tao/json/forward.hpp
Expand Up @@ -4,48 +4,41 @@
#ifndef TAO_JSON_FORWARD_HPP
#define TAO_JSON_FORWARD_HPP

#include <cstddef>
#include <vector>

namespace tao
namespace tao::json
{
using binary = std::vector< std::byte >;

namespace json
namespace events
{
namespace events
{
class virtual_base;
class virtual_base;

} // namespace events
} // namespace events

template< typename T, typename = void >
struct traits
{};
template< typename T, typename = void >
struct traits
{};

template< template< typename... > class Traits >
class basic_value;
template< template< typename... > class Traits >
class basic_value;

using producer_t = void ( * )( events::virtual_base&, const void* );
using value = basic_value< traits >;

namespace internal
{
struct opaque_ptr_t
{
const void* data;
producer_t producer;
};
using producer_t = void ( * )( events::virtual_base&, const void* );

template< template< typename... > class Traits >
struct single;
namespace internal
{
struct opaque_ptr_t
{
const void* data;
producer_t producer;
};

template< template< typename... > class Traits >
struct pair;
template< template< typename... > class Traits >
struct single;

} // namespace internal
template< template< typename... > class Traits >
struct pair;

} // namespace json
} // namespace internal

} // namespace tao
} // namespace tao::json

#endif
7 changes: 1 addition & 6 deletions include/tao/json/value.hpp
Expand Up @@ -5,13 +5,8 @@
#define TAO_JSON_VALUE_HPP

#include "basic_value.hpp"
#include "forward.hpp"
#include "operators.hpp"
#include "traits.hpp"

namespace tao::json
{
using value = basic_value< traits >;

} // namespace tao::json

#endif

0 comments on commit 07306b7

Please sign in to comment.