Skip to content

Commit

Permalink
Renamed namespace leaf_detail -> detail
Browse files Browse the repository at this point in the history
  • Loading branch information
zajo committed Sep 9, 2024
1 parent f81020e commit ec11ab1
Show file tree
Hide file tree
Showing 24 changed files with 161 additions and 161 deletions.
2 changes: 1 addition & 1 deletion include/boost/leaf/config/tls_array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static_assert((BOOST_LEAF_CFG_TLS_ARRAY_START_INDEX) >= 0,

namespace boost { namespace leaf {

namespace leaf_detail
namespace detail
{
using atomic_unsigned_int = std::atomic<unsigned int>;
}
Expand Down
2 changes: 1 addition & 1 deletion include/boost/leaf/config/tls_cpp11.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

namespace boost { namespace leaf {

namespace leaf_detail
namespace detail
{
using atomic_unsigned_int = std::atomic<unsigned int>;
}
Expand Down
2 changes: 1 addition & 1 deletion include/boost/leaf/config/tls_globals.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace boost { namespace leaf {

namespace leaf_detail
namespace detail
{
using atomic_unsigned_int = unsigned int;
}
Expand Down
24 changes: 12 additions & 12 deletions include/boost/leaf/context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct is_predicate: std::false_type
{
};

namespace leaf_detail
namespace detail
{
template <class T>
struct is_exception: std::is_base_of<std::exception, typename std::decay<T>::type>
Expand Down Expand Up @@ -135,7 +135,7 @@ namespace leaf_detail

////////////////////////////////////////

namespace leaf_detail
namespace detail
{
template <class T>
struct get_dispatch
Expand Down Expand Up @@ -176,7 +176,7 @@ namespace leaf_detail

////////////////////////////////////////

namespace leaf_detail
namespace detail
{
template <int I, class Tup>
struct tuple_for_each
Expand Down Expand Up @@ -232,7 +232,7 @@ namespace leaf_detail

////////////////////////////////////////////

namespace leaf_detail
namespace detail
{
template <class T> struct does_not_participate_in_context_deduction: std::is_abstract<T> { };
template <> struct does_not_participate_in_context_deduction<error_id>: std::true_type { };
Expand Down Expand Up @@ -273,7 +273,7 @@ class context
context( context const & ) = delete;
context & operator=( context const & ) = delete;

using Tup = leaf_detail::deduce_e_tuple<E...>;
using Tup = detail::deduce_e_tuple<E...>;
Tup tup_;
bool is_active_;

Expand Down Expand Up @@ -336,7 +336,7 @@ class context

BOOST_LEAF_CONSTEXPR void activate() noexcept
{
using namespace leaf_detail;
using namespace detail;
BOOST_LEAF_ASSERT(!is_active());
tuple_for_each<std::tuple_size<Tup>::value,Tup>::activate(tup_);
#if !defined(BOOST_LEAF_NO_THREADS) && !defined(NDEBUG)
Expand All @@ -347,7 +347,7 @@ class context

BOOST_LEAF_CONSTEXPR void deactivate() noexcept
{
using namespace leaf_detail;
using namespace detail;
BOOST_LEAF_ASSERT(is_active());
is_active_ = false;
#if !defined(BOOST_LEAF_NO_THREADS) && !defined(NDEBUG)
Expand All @@ -360,7 +360,7 @@ class context
BOOST_LEAF_CONSTEXPR void unload(error_id id) noexcept
{
BOOST_LEAF_ASSERT(!is_active());
leaf_detail::tuple_for_each<std::tuple_size<Tup>::value,Tup>::unload(tup_, id.value());
detail::tuple_for_each<std::tuple_size<Tup>::value,Tup>::unload(tup_, id.value());
}

BOOST_LEAF_CONSTEXPR bool is_active() const noexcept
Expand All @@ -372,7 +372,7 @@ class context
void print( std::basic_ostream<CharT, Traits> & os ) const
{
char const * prefix = "Contents:";
leaf_detail::print_tuple_contents<Tup>(os, &tup_, error_id(), prefix);
detail::print_tuple_contents<Tup>(os, &tup_, error_id(), prefix);
}

template <class CharT, class Traits>
Expand All @@ -385,7 +385,7 @@ class context
template <class T>
BOOST_LEAF_CONSTEXPR T const * get(error_id err) const noexcept
{
leaf_detail::slot<T> const * e = leaf_detail::find_in_tuple<leaf_detail::slot<T>>(tup_);
detail::slot<T> const * e = detail::find_in_tuple<detail::slot<T>>(tup_);
return e ? e->has_value(err.value()) : nullptr;
}

Expand All @@ -403,7 +403,7 @@ class context

////////////////////////////////////////

namespace leaf_detail
namespace detail
{
template <class TypeList>
struct deduce_context_impl;
Expand Down Expand Up @@ -443,7 +443,7 @@ namespace leaf_detail
}

template <class... H>
using context_type_from_handlers = typename leaf_detail::context_type_from_handlers_impl<H...>::type;
using context_type_from_handlers = typename detail::context_type_from_handlers_impl<H...>::type;

////////////////////////////////////////////

Expand Down
4 changes: 2 additions & 2 deletions include/boost/leaf/detail/capture_list.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace boost { namespace leaf {

class error_id;

namespace leaf_detail
namespace detail
{
struct BOOST_LEAF_SYMBOL_VISIBLE tls_tag_id_factory_current_id;

Expand Down Expand Up @@ -88,7 +88,7 @@ namespace leaf_detail
{
capture_list moved(first_);
first_ = nullptr;
tls::write_uint<leaf_detail::tls_tag_id_factory_current_id>(unsigned(err_id));
tls::write_uint<detail::tls_tag_id_factory_current_id>(unsigned(err_id));
moved.for_each(
[err_id]( node & n )
{
Expand Down
8 changes: 4 additions & 4 deletions include/boost/leaf/detail/demangle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

namespace boost { namespace leaf {

namespace leaf_detail
namespace detail
{
// The functions below are C++11 constexpr, but we use BOOST_LEAF_ALWAYS_INLINE to control object file
// section count / template bleat. Evidently this makes a difference on gcc / windows at least.
Expand Down Expand Up @@ -145,7 +145,7 @@ namespace n
// Unrecognized __PRETTY_FUNCTION__/__FUNCSIG__ formats will result in compiler diagnostics.
// In that case, please file an issue on https://github.com/boostorg/leaf.

#define BOOST_LEAF_P(P) (sizeof(char[1 + leaf_detail::check_prefix(BOOST_LEAF_PRETTY_FUNCTION, P)]) - 1)
#define BOOST_LEAF_P(P) (sizeof(char[1 + detail::check_prefix(BOOST_LEAF_PRETTY_FUNCTION, P)]) - 1)
// clang style:
int const p01 = BOOST_LEAF_P("r boost::leaf::n::p() [T = ");
// old clang style:
Expand All @@ -170,7 +170,7 @@ namespace n
int const p15 = BOOST_LEAF_P("struct boost::leaf::n::r __fastcall boost::leaf::n::p<");
#undef BOOST_LEAF_P

#define BOOST_LEAF_S(S) (sizeof(char[1 + leaf_detail::check_suffix(BOOST_LEAF_PRETTY_FUNCTION, S)]) - 1)
#define BOOST_LEAF_S(S) (sizeof(char[1 + detail::check_suffix(BOOST_LEAF_PRETTY_FUNCTION, S)]) - 1)
// clang/gcc style:
int const s01 = BOOST_LEAF_S("]");
// msvc style:
Expand Down Expand Up @@ -213,7 +213,7 @@ parsed parse()

namespace boost { namespace leaf {

namespace leaf_detail
namespace detail
{
template <class CharT, class Traits>
std::ostream & demangle_and_print(std::basic_ostream<CharT, Traits> & os, char const * mangled_name)
Expand Down
2 changes: 1 addition & 1 deletion include/boost/leaf/detail/function_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace boost { namespace leaf {

namespace leaf_detail
namespace detail
{
template <class T> struct remove_noexcept { using type = T; };
template <class R, class... A> struct remove_noexcept<R(*)(A...) noexcept> { using type = R(*)(A...); };
Expand Down
2 changes: 1 addition & 1 deletion include/boost/leaf/detail/optional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace boost { namespace leaf {

namespace leaf_detail
namespace detail
{
template <class T>
class optional
Expand Down
2 changes: 1 addition & 1 deletion include/boost/leaf/detail/print.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct show_in_diagnostics: std::true_type
{
};

namespace leaf_detail
namespace detail
{
template <class T, class E = void>
struct is_printable: std::false_type
Expand Down
16 changes: 8 additions & 8 deletions include/boost/leaf/diagnostics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class diagnostic_info: public error_info
BOOST_LEAF_CONSTEXPR diagnostic_info( error_info const & ei, Tup const & tup ) noexcept:
error_info(ei),
tup_(&tup),
print_tuple_contents_(&leaf_detail::print_tuple_contents<Tup>)
print_tuple_contents_(&detail::print_tuple_contents<Tup>)
{
}

Expand All @@ -47,7 +47,7 @@ class diagnostic_info: public error_info
}
};

namespace leaf_detail
namespace detail
{
struct diagnostic_info_: diagnostic_info
{
Expand Down Expand Up @@ -97,7 +97,7 @@ class diagnostic_info: public error_info
}
};

namespace leaf_detail
namespace detail
{
struct diagnostic_info_: diagnostic_info
{
Expand Down Expand Up @@ -128,14 +128,14 @@ namespace leaf_detail

class diagnostic_details: public diagnostic_info
{
leaf_detail::dynamic_allocator const * const da_;
detail::dynamic_allocator const * const da_;

protected:

diagnostic_details( diagnostic_details const & ) noexcept = default;

template <class Tup>
BOOST_LEAF_CONSTEXPR diagnostic_details( error_info const & ei, Tup const & tup, leaf_detail::dynamic_allocator const * da ) noexcept:
BOOST_LEAF_CONSTEXPR diagnostic_details( error_info const & ei, Tup const & tup, detail::dynamic_allocator const * da ) noexcept:
diagnostic_info(ei, tup),
da_(da)
{
Expand All @@ -160,7 +160,7 @@ class diagnostic_details: public diagnostic_info
}
};

namespace leaf_detail
namespace detail
{
struct diagnostic_details_: diagnostic_details
{
Expand Down Expand Up @@ -212,7 +212,7 @@ class diagnostic_details: public diagnostic_info
}
};

namespace leaf_detail
namespace detail
{
struct diagnostic_details_: diagnostic_details
{
Expand Down Expand Up @@ -264,7 +264,7 @@ class diagnostic_details: public diagnostic_info
}
};

namespace leaf_detail
namespace detail
{
struct diagnostic_details_: diagnostic_details
{
Expand Down
Loading

0 comments on commit ec11ab1

Please sign in to comment.