Skip to content

Commit 0dae9bf

Browse files
committed
refactor(*headers): correct headers location
move headers to include/stdsharp
1 parent 2ea3258 commit 0dae9bf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+274
-274
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ target_install(
4141
NAMESPACE ${PROJECT_NAME}
4242
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}
4343
INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include
44-
INCLUDE_DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
44+
INCLUDE_DESTINATION include
4545
COMPATIBILITY SameMajorVersion
4646
DEPENDENCIES fmt;ctre;range-v3
4747
)

include/functional/functional.h

Lines changed: 0 additions & 7 deletions
This file was deleted.

include/algorithm/algorithm.h renamed to include/stdsharp/algorithm/algorithm.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#include <fmt/format.h>
99
#endif
1010

11-
#include "functional/operations.h"
12-
#include "functional/invoke.h"
13-
#include "cassert/cassert.h"
11+
#include "../functional/operations.h"
12+
#include "../functional/invoke.h"
13+
#include "../cassert/cassert.h"
1414

1515
namespace stdsharp
1616
{
File renamed without changes.

include/concepts/concepts.h renamed to include/stdsharp/concepts/concepts.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include <concepts>
88
#include <type_traits>
9+
910
#include <range/v3/functional/arithmetic.hpp>
1011

1112
namespace stdsharp::concepts
File renamed without changes.

include/containers/actions.h renamed to include/stdsharp/containers/actions.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
//
44

55
#pragma once
6-
#include <range/v3/action.hpp>
76
#include <utility>
87

9-
#include "containers/actions.h"
10-
#include "functional/invocables.h"
11-
#include "tuple/tuple.h"
12-
#include "containers/containers.h"
8+
#include <range/v3/action.hpp>
9+
10+
#include "../functional/invocables.h"
11+
#include "../tuple/tuple.h"
12+
#include "containers.h"
1313

1414
namespace stdsharp::actions
1515
{

include/containers/containers.h renamed to include/stdsharp/containers/containers.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
#include <stack>
1515
#include <queue>
1616

17-
#include "memory/memory.h"
18-
#include "ranges/ranges.h"
19-
#include "concepts/concepts.h"
17+
#include "../memory/memory.h"
18+
#include "../ranges/ranges.h"
19+
#include "../concepts/concepts.h"
2020

2121
namespace stdsharp
2222
{
Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,64 @@
1-
#pragma once
2-
3-
#include <climits>
4-
#include <limits>
5-
#include <stdexcept>
6-
7-
#include "utility/utility.h"
8-
9-
namespace stdsharp
10-
{
11-
inline constexpr ::std::size_t char_bit = CHAR_BIT;
12-
13-
using byte = ::std::underlying_type_t<::std::byte>;
14-
using i8 = ::std::int8_t; ///< 8-bit signed integer type.
15-
using u8 = ::std::uint8_t; ///< 8-bit unsigned integer type.
16-
using i16 = ::std::int16_t; ///< 16-bit signed integer type.
17-
using u16 = ::std::uint16_t; ///< 16-bit unsigned integer type.
18-
using i32 = ::std::int32_t; ///< 32-bit signed integer type.
19-
using u32 = ::std::uint32_t; ///< 32-bit unsigned integer type.
20-
using i64 = ::std::int64_t; ///< 64-bit signed integer type.
21-
using u64 = ::std::uint64_t; ///< 64-bit unsigned integer type.
22-
using ssize_t =
23-
::std::make_signed_t<::std::size_t>; ///< Signed integer type corresponding to `size_t`.
24-
25-
inline constexpr struct
26-
{
27-
template<typename T>
28-
[[nodiscard]] constexpr ::std::make_unsigned_t<T> operator()(const T t) noexcept
29-
{
30-
return auto_cast(t);
31-
}
32-
} make_unsigned{};
33-
34-
inline constexpr struct
35-
{
36-
template<typename T>
37-
[[nodiscard]] constexpr ::std::make_signed_t<T> operator()(const T t) noexcept
38-
{
39-
return auto_cast(t);
40-
}
41-
} make_signed{};
42-
43-
inline namespace literals
44-
{
45-
#define BS_INT_LITERALS(literal) \
46-
[[nodiscard]] constexpr auto operator""_##literal(const unsigned long long value) noexcept \
47-
{ \
48-
return static_cast<literal>(value); \
49-
}
50-
51-
#define BS_SIGNS_INT_LITERALS(num) BS_INT_LITERALS(i##num) BS_INT_LITERALS(u##num)
52-
53-
BS_SIGNS_INT_LITERALS(8)
54-
BS_SIGNS_INT_LITERALS(16)
55-
BS_SIGNS_INT_LITERALS(32)
56-
BS_SIGNS_INT_LITERALS(64)
57-
58-
#undef BS_SIGNS_INT_LITERALS
59-
60-
BS_INT_LITERALS(byte)
61-
62-
#undef BS_INT_LITERALS
63-
}
64-
}
1+
#pragma once
2+
3+
#include <climits>
4+
#include <limits>
5+
#include <stdexcept>
6+
7+
#include "../utility/utility.h"
8+
9+
namespace stdsharp
10+
{
11+
inline constexpr ::std::size_t char_bit = CHAR_BIT;
12+
13+
using byte = ::std::underlying_type_t<::std::byte>;
14+
using i8 = ::std::int8_t; ///< 8-bit signed integer type.
15+
using u8 = ::std::uint8_t; ///< 8-bit unsigned integer type.
16+
using i16 = ::std::int16_t; ///< 16-bit signed integer type.
17+
using u16 = ::std::uint16_t; ///< 16-bit unsigned integer type.
18+
using i32 = ::std::int32_t; ///< 32-bit signed integer type.
19+
using u32 = ::std::uint32_t; ///< 32-bit unsigned integer type.
20+
using i64 = ::std::int64_t; ///< 64-bit signed integer type.
21+
using u64 = ::std::uint64_t; ///< 64-bit unsigned integer type.
22+
using ssize_t =
23+
::std::make_signed_t<::std::size_t>; ///< Signed integer type corresponding to `size_t`.
24+
25+
inline constexpr struct
26+
{
27+
template<typename T>
28+
[[nodiscard]] constexpr ::std::make_unsigned_t<T> operator()(const T t) noexcept
29+
{
30+
return auto_cast(t);
31+
}
32+
} make_unsigned{};
33+
34+
inline constexpr struct
35+
{
36+
template<typename T>
37+
[[nodiscard]] constexpr ::std::make_signed_t<T> operator()(const T t) noexcept
38+
{
39+
return auto_cast(t);
40+
}
41+
} make_signed{};
42+
43+
inline namespace literals
44+
{
45+
#define BS_INT_LITERALS(literal) \
46+
[[nodiscard]] constexpr auto operator""_##literal(const unsigned long long value) noexcept \
47+
{ \
48+
return static_cast<literal>(value); \
49+
}
50+
51+
#define BS_SIGNS_INT_LITERALS(num) BS_INT_LITERALS(i##num) BS_INT_LITERALS(u##num)
52+
53+
BS_SIGNS_INT_LITERALS(8)
54+
BS_SIGNS_INT_LITERALS(16)
55+
BS_SIGNS_INT_LITERALS(32)
56+
BS_SIGNS_INT_LITERALS(64)
57+
58+
#undef BS_SIGNS_INT_LITERALS
59+
60+
BS_INT_LITERALS(byte)
61+
62+
#undef BS_INT_LITERALS
63+
}
64+
}

include/cuchar/cuchar.h renamed to include/stdsharp/cuchar/cuchar.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
#include "pattern_match.h"
21
#include <cstddef>
32
#include <cstdlib>
43
#include <cuchar>
54
#include <stdexcept>
65
#include <string>
76

8-
#include <functional/cpo.h>
9-
#include <type_traits>
7+
#include "../functional/cpo.h"
8+
#include "../pattern_match.h"
109

1110
namespace stdsharp
1211
{

0 commit comments

Comments
 (0)