Fix 'detail' namespace closing for Borland

In `type_with_alignment.hpp`, the `boost::detail` namespace is opened in line 28 just before starting the main `#ifndef __BORLANDC__`-block at line 30. The `detail` namespace is closed within the `#ifndef`-block at line 79. Highlight that namespace closing-brace with a comment for visibility.

Furthermore, the main `#ifndef __BORLANDC__`-block has a `#else`-case beginning at line 209, which effectively begins the `boost::detail` namespace at that point. This continuation of the namespace was missing a closing brace, causing a compilation failure with C++Builder (due to not finding `::boost::tt_align_ns::a16` in line 230, but merely finding `::boost::detail::tt_align_ns::a16`). Add that closing brace in line 217 with a visibility comment, just before opening the `tt_align_ns` namespace (which is expected by existing code to be directly inside the `boost` namespace, and not inside `boost::detail`).
This commit is contained in:
Tanzinul Islam
2017-08-27 14:54:47 +01:00
parent 06d07e3d11
commit 907bbbb759

View File

@ -76,7 +76,7 @@ template <std::size_t Target> struct short_alignment<Target, false>{ typedef typ
template <std::size_t Target, bool check> struct char_alignment{ typedef char type; };
template <std::size_t Target> struct char_alignment<Target, false>{ typedef typename short_alignment<Target, boost::alignment_of<short>::value >= Target>::type type; };
}
} // namespace detail
template <std::size_t Align>
struct type_with_alignment
@ -214,6 +214,8 @@ template<> struct is_pod< ::boost::tt_align_ns::a128> : public true_type{};
// 2) Because of Borlands #pragma option we can create types with alignments that are
// greater that the largest aligned builtin type.
} // namespace detail
namespace tt_align_ns{
#pragma option push -a16
struct a2{ short s; };