Skip to content

Commit 05675f7

Browse files
committed
[any.class, optional.optional] Add missing "namespace std" around class definitions.
1 parent a21e45e commit 05675f7

File tree

1 file changed

+37
-30
lines changed

1 file changed

+37
-30
lines changed

source/utilities.tex

Lines changed: 37 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2189,7 +2189,8 @@
21892189
\indexlibrary{\idxcode{optional}}%
21902190
\indexlibrarymember{value_type}{optional}%
21912191
\begin{codeblock}
2192-
template<class T>
2192+
namespace std {
2193+
template<class T>
21932194
class optional {
21942195
public:
21952196
using value_type = T;
@@ -2246,10 +2247,12 @@
22462247
void reset() noexcept;
22472248

22482249
private:
2249-
T *val; // \expos
2250+
T *val; // \expos
22502251
};
22512252

2252-
template<class T> optional(T) -> optional<T>;
2253+
template<class T>
2254+
optional(T) -> optional<T>;
2255+
}
22532256
\end{codeblock}
22542257

22552258
\pnum
@@ -5059,41 +5062,45 @@
50595062
\rSec2[any.class]{Class \tcode{any}}
50605063

50615064
\begin{codeblock}
5062-
class any {
5063-
public:
5064-
// \ref{any.cons}, construction and destruction
5065-
constexpr any() noexcept;
5065+
namespace std {
5066+
class any {
5067+
public:
5068+
// \ref{any.cons}, construction and destruction
5069+
constexpr any() noexcept;
50665070

5067-
any(const any& other);
5068-
any(any&& other) noexcept;
5071+
any(const any& other);
5072+
any(any&& other) noexcept;
50695073

5070-
template<class T> any(T&& value);
5074+
template<class T>
5075+
any(T&& value);
50715076

5072-
template<class T, class... Args>
5073-
explicit any(in_place_type_t<T>, Args&&...);
5074-
template<class T, class U, class... Args>
5075-
explicit any(in_place_type_t<T>, initializer_list<U>, Args&&...);
5077+
template<class T, class... Args>
5078+
explicit any(in_place_type_t<T>, Args&&...);
5079+
template<class T, class U, class... Args>
5080+
explicit any(in_place_type_t<T>, initializer_list<U>, Args&&...);
50765081

5077-
~any();
5082+
~any();
50785083

5079-
// \ref{any.assign}, assignments
5080-
any& operator=(const any& rhs);
5081-
any& operator=(any&& rhs) noexcept;
5084+
// \ref{any.assign}, assignments
5085+
any& operator=(const any& rhs);
5086+
any& operator=(any&& rhs) noexcept;
50825087

5083-
template<class T> any& operator=(T&& rhs);
5088+
template<class T>
5089+
any& operator=(T&& rhs);
50845090

5085-
// \ref{any.modifiers}, modifiers
5086-
template<class T, class... Args>
5087-
decay_t<T>& emplace(Args&& ...);
5088-
template<class T, class U, class... Args>
5089-
decay_t<T>& emplace(initializer_list<U>, Args&&...);
5090-
void reset() noexcept;
5091-
void swap(any& rhs) noexcept;
5091+
// \ref{any.modifiers}, modifiers
5092+
template<class T, class... Args>
5093+
decay_t<T>& emplace(Args&& ...);
5094+
template<class T, class U, class... Args>
5095+
decay_t<T>& emplace(initializer_list<U>, Args&&...);
5096+
void reset() noexcept;
5097+
void swap(any& rhs) noexcept;
50925098

5093-
// \ref{any.observers}, observers
5094-
bool has_value() const noexcept;
5095-
const type_info& type() const noexcept;
5096-
};
5099+
// \ref{any.observers}, observers
5100+
bool has_value() const noexcept;
5101+
const type_info& type() const noexcept;
5102+
};
5103+
}
50975104
\end{codeblock}
50985105

50995106
\pnum

0 commit comments

Comments
 (0)