Skip to content

Commit d464fa1

Browse files
committed
Enclose outcome:: in scale:: namespace
1 parent 7c6de30 commit d464fa1

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

include/scale/outcome/outcome-register.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
#define OUTCOME_USE_STD_IN_PLACE_TYPE 1
2323

24-
namespace __outcome_detail {
24+
namespace scale::__outcome_detail {
2525

2626
template <typename T> class Category : public std::error_category {
2727
public:
@@ -52,11 +52,11 @@ template <typename T> class Category : public std::error_category {
5252
Category() = default;
5353
}; /* end of class */
5454

55-
} // namespace __outcome_detail
55+
} // namespace scale::__outcome_detail
5656

5757
#define __OUTCOME_DEFINE_MAKE_ERROR_CODE(Enum) \
5858
extern std::error_code make_error_code(Enum e) { \
59-
return {static_cast<int>(e), __outcome_detail::Category<Enum>::get()}; \
59+
return {static_cast<int>(e), scale::__outcome_detail::Category<Enum>::get()}; \
6060
}
6161

6262
#define __OUTCOME_DECLARE_MAKE_ERROR_CODE(Enum) \
@@ -87,14 +87,14 @@ template <typename T> class Category : public std::error_category {
8787
__OUTCOME_DEFINE_MAKE_ERROR_CODE(Enum) \
8888
}; \
8989
template <> \
90-
std::string __outcome_detail::Category<ns::Enum>::toString(ns::Enum Name)
90+
std::string scale::__outcome_detail::Category<ns::Enum>::toString(ns::Enum Name)
9191

9292
/// MUST BE EXECUTED AT FILE LEVEL(global namespace) IN CPP
9393
// Enum - enum name. Example: EncodeError
9494
// Name - variable name. Example: e
9595
#define OUTCOME_CPP_DEFINE_CATEGORY_2(Enum, Name) \
9696
__OUTCOME_DEFINE_MAKE_ERROR_CODE(Enum) \
97-
template <> std::string __outcome_detail::Category<Enum>::toString(Enum Name)
97+
template <> std::string scale::__outcome_detail::Category<Enum>::toString(Enum Name)
9898

9999
// kind of "macro overloading"
100100
#define __GET_MACRO_3(_1, _2, _3, NAME, ...) NAME

include/scale/outcome/outcome.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515

1616
#include "outcome-register.hpp"
1717

18-
namespace outcome {
18+
namespace scale::outcome {
1919

2020
using namespace BOOST_OUTCOME_V2_NAMESPACE;
2121

2222
template <class R, class S = std::error_code,
2323
class NoValuePolicy = policy::default_policy<R, S, void>>
2424
using result = basic_result<R, S, NoValuePolicy>;
2525

26-
} // namespace outcome
26+
} // namespace scale::outcome
2727

2828
#define OUTCOME_TRY(...) BOOST_OUTCOME_TRY(__VA_ARGS__)
2929

0 commit comments

Comments
 (0)