viva manchester united 4 ever

For Each ctl_CLEF In Controls
If ctl_CLEF.Tag = "CLEF" Then
ctl_CLEF.Locked = Verrouillage
ctl_CLEF.BackColor = code_Couleur
End If
Next ctl_CLEF

%!TEX root = std.tex

\rSec0[class]{Classes}%
\indextext{class|(}
%gram: \rSec1[gram.class]{Classes}
%gram:
\indextext{class!member function|see{member function, class}}
\pnum
\indextext{\idxcode{{}}!class declaration}%
\indextext{\idxcode{{}}!class definition}%
\indextext{type!class~and}%
\indextext{object~class|see{also~class~object}}%
A class is a type.
\indextext{name~class|see{class~name}}%
Its name becomes a \grammarterm{class-name}~(\ref{class.name}) within its
scope.
\begin{bnf}
\nontermdef{class-name}\br
identifier\br
simple-template-id
\end{bnf}
\grammarterm{Class-specifier}{s} and
\grammarterm{elaborated-type-specifier}{s}~(\ref{dcl.type.elab}) are used to
make \grammarterm{class-name}{s}. An object of a class consists of a
(possibly empty) sequence of members and base class objects.
\begin{bnf}
\nontermdef{class-specifier}\br
class-head \terminal{{} member-specification\opt \terminal{}}
\end{bnf}
\begin{bnf}
\nontermdef{class-head}\br
class-key attribute-specifier-seq\opt class-head-name class-virt-specifier\opt base-clause\opt\br
class-key attribute-specifier-seq\opt base-clause\opt
\end{bnf}
\begin{bnf}
\nontermdef{class-head-name}\br
nested-name-specifier\opt class-name
\end{bnf}
\begin{bnf}
\nontermdef{class-virt-specifier}\br
\terminal{final}
\end{bnf}
\begin{bnf}
\nontermdef{class-key}\br
\terminal{class}\br
\terminal{struct}\br
\terminal{union}
\end{bnf}
A \grammarterm{class-specifier} whose
\grammarterm{class-head} omits the
\grammarterm{class-head-name} defines an unnamed class. \enternote An unnamed class thus can't
be \tcode{final}. \exitnote
\pnum
A \grammarterm{class-name} is inserted into the scope in which it is
declared immediately after the \grammarterm{class-name} is seen. The
\grammarterm{class-name} is also inserted into the scope of the class
itself; this is known as the \grammarterm{injected-class-name}.
\indextext{\idxgram{injected-class-name}}%
For purposes of access checking, the injected-class-name is treated as
if it were a public member name.
\indextext{definition!class}%
A \grammarterm{class-specifier} is commonly referred to as a class
definition.
\indextext{definition!class}%
A class is considered defined after the closing brace of its
\grammarterm{class-specifier} has been seen even though its member
functions are in general not yet defined.
The optional \grammarterm{attribute-specifier-seq} appertains to the class; the attributes in
the \grammarterm{attribute-specifier-seq} are thereafter considered attributes of the class
whenever it is named.
\pnum
If a class is marked with the \grammarterm{class-virt-specifier} \tcode{final} and it appears
as a \grammarterm{base-type-specifier} in a \grammarterm{base-clause}
(Clause~\ref{class.derived}), the program is ill-formed. Whenever a
\grammarterm{class-key} is followed by a \grammarterm{class-head-name}, the
\grammarterm{identifier} \tcode{final}, and a colon or left brace, \tcode{final} is
interpreted as a \grammarterm{class-virt-specifier}. \enterexample
\begin{codeblock}
struct A;
struct A final {}; // OK: definition of \tcode{struct A},
// not value-initialization of variable \tcode{final}
struct X {
struct C { constexpr operator int() { return 5; } };
struct B final : C{}; // OK: definition of nested class \tcode{B},
// not declaration of a bit-field member \tcode{final}
};
\end{codeblock}
\exitexample
\pnum
Complete objects and member subobjects of class type shall have nonzero
size.\footnote{Base class subobjects are not so constrained.}
\enternote
Class objects can be assigned, passed as arguments to functions, and
returned by functions (except objects of classes for which copying or moving has
been restricted; see~\ref{class.copy}). Other plausible operators, such
as equality comparison, can be defined by the user; see~\ref{over.oper}.
\exitnote
\pnum
\indextext{\idxcode{struct}!\tcode{class}~versus}%
\indextext{structure}%
\indextext{\idxcode{union}!\tcode{class}~versus}%
A \term{union} is a class defined with the \grammarterm{class-key}
\tcode{union};
\indextext{access control!\idxcode{union} default member}%
it holds at most one data member at a time~(\ref{class.union}).
\enternote
Aggregates of class type are described in~\ref{dcl.init.aggr}.
\exitnote
\indextext{class!trivial}%
\indextext{trivial~class}%
\pnum
A \defn{trivially copyable class} is a class that:
\begin{itemize}
\item has no non-trivial copy constructors~(\ref{class.copy}),
\item has no non-trivial move constructors~(\ref{class.copy}),
\item has no non-trivial copy assignment operators~(\ref{over.ass},~\ref{class.copy}),
\item has no non-trivial move assignment operators~(\ref{over.ass},~\ref{class.copy}), and
\item has a trivial destructor~(\ref{class.dtor}).
\end{itemize}
A \term{trivial class} is a class that has a default
constructor~(\ref{class.ctor}), has no non-trivial default constructors, and is trivially copyable.
\enternote In particular, a trivially copyable or trivial class does not have
virtual functions or virtual base classes.\exitnote
\indextext{class!standard-layout}%
\indextext{standard-layout~class}%
\pnum
A class \tcode{S} is a \grammarterm{standard-layout class} if it:
\begin{itemize}
\item has no non-static data members of type non-standard-layout class
(or array of such types) or reference,
\item has no virtual functions~(\ref{class.virtual}) and no
virtual base classes~(\ref{class.mi}),
\item has the same access control (Clause~\ref{class.access})
for all non-static data members,
\item has no non-standard-layout base classes,
\item has at most one base class subobject of any given type,
\item has all non-static data members and bit-fields in the class and
its base classes first declared in the same class, and
\item has no element of the set $M(\mathtt{S})$ of types (defined below)
as a base class.\footnote{This ensures that two subobjects that have the
same class type and that
belong to the same most derived object are not allocated at the same
address~(\ref{expr.eq}).}
\end{itemize}
$M(\mathtt{X})$ is defined as follows:
\begin{itemize}
\item If \tcode{X} is a non-union class type, the set $M(\mathtt{X})$ is
empty if \tcode{X} has no (possibly inherited (Clause~\ref{class.derived}))
non-static data members;
otherwise, it consists of the type of the first non-static data member
of \tcode{X} (where said member may be an anonymous union), $\mathtt{X}_0$,
and the elements of $M(\mathtt{X}_0)$.
\item If \tcode{X} is a union type, the set $M(\mathtt{X})$ is
the union of all $M(\mathtt{U}_i)$ and the set containing all $\mathtt{U}_i$,
where each $\mathtt{U}_i$ is the type of the $i$th non-static data member
of \tcode{X}.
\item If \tcode{X} is a non-class type, the set $M(\mathtt{X})$ is empty.
\end{itemize}
\enternote $M(\mathtt{X})$ is the set of the types of all non-base-class subobjects
that are guaranteed in a standard-layout class to be at a zero offset
in \tcode{X}. \exitnote
\enterexample
\begin{codeblock}
struct B { int i; }; // standard-layout class
struct C : B { }; // standard-layout class
struct D : C { }; // standard-layout class
struct E : D { char : 4; }; // not a standard-layout class
struct Q {};
struct S : Q { };
struct T : Q { };
struct U : S, T { }; // not a standard-layout class
\end{codeblock}
\exitexample
\indextext{struct!standard-layout}%
\indextext{standard-layout~struct}%
\indextext{union!standard-layout}%
\indextext{standard-layout~union}%
\pnum
A \grammarterm{standard-layout struct} is a standard-layout class
defined with the \grammarterm{class-key} \tcode{struct} or the
\grammarterm{class-key} \tcode{class}.
A \grammarterm{standard-layout union} is a standard-layout class
defined with the
\grammarterm{class-key} \tcode{union}.
\pnum
\enternote Standard-layout classes are useful for communicating with
code written in other programming languages. Their layout is specified
in~\ref{class.mem}.\exitnote
\pnum
\indextext{POD struct}\indextext{POD class}\indextext{POD union}%
A \term{POD struct}\footnote{The acronym POD stands for ``plain old data''.}
is a non-union class that is both a trivial class and a
standard-layout class, and has no non-static data members of type non-POD struct,
non-POD union (or array of such types). Similarly, a
\term{POD union} is a union that is both a trivial class and a standard-layout
class, and has no non-static data members of type non-POD struct, non-POD
union (or array of such types). A \term{POD class} is a
class that is either a POD struct or a POD union.
\enterexample
\begin{codeblock}
struct N { // neither trivial nor standard-layout
int i;
int j;
virtual ~N();
};
struct T { // trivial but not standard-layout
int i;
private:
int j;
};
struct SL { // standard-layout but not trivial
int i;
int j;
~SL();
};
struct POD { // both trivial and standard-layout
int i;
int j;
};
\end{codeblock}
\exitexample
\pnum
If a \grammarterm{class-head-name} contains a \grammarterm{nested-name-specifier},
the \grammarterm{class-specifier} shall refer to a class that was
previously declared directly in the class or namespace to which the
\grammarterm{nested-name-specifier} refers,
or in an element of the inline namespace set~(\ref{namespace.def}) of that namespace
(i.e., not merely inherited or
introduced by a \grammarterm{using-declaration}), and the
\grammarterm{class-specifier} shall appear in a namespace enclosing the
previous declaration.
In such cases, the \grammarterm{nested-name-specifier} of the
\grammarterm{class-head-name} of the
definition shall not begin with a \grammarterm{decltype-specifier}.
\rSec1[class.name]{Class names}
\indextext{definition!class~name~as type}%
\indextext{structure~tag|see{class~name}}%
\indextext{equivalence!type}%
\pnum
A class definition introduces a new type.
\enterexample
\begin{codeblock}
struct X { int a; };
struct Y { int a; };
X a1;
Y a2;
int a3;
\end{codeblock}
declares three variables of three different types. This implies that
\begin{codeblock}
a1 = a2; // error: \tcode{Y} assigned to \tcode{X}
a1 = a3; // error: \tcode{int} assigned to \tcode{X}
\end{codeblock}
are type mismatches, and that
\begin{codeblock}
int f(X);
int f(Y);
\end{codeblock}
\indextext{overloading}%
declare an overloaded (Clause~\ref{over}) function \tcode{f()} and not
simply a single function \tcode{f()} twice. For the same reason,
\begin{codeblock}
struct S { int a; };
struct S { int a; }; // error, double definition
\end{codeblock}
is ill-formed because it defines \tcode{S} twice.
\exitexample
\pnum
\indextext{definition!scope~of class}%
\indextext{class~name!scope~of}%
A class declaration introduces the class name into the scope where
\indextext{name~hiding!class definition}%
it is declared and hides any
class, variable, function, or other declaration of that name in an
enclosing scope~(\ref{basic.scope}). If a class name is declared in a
scope where a variable, function, or enumerator of the same name is also
declared, then when both declarations are in scope, the class can be
referred to only using an
\grammarterm{elaborated-type-specifier}~(\ref{basic.lookup.elab}).
\enterexample
\begin{codeblock}
struct stat {
// ...
};
stat gstat; // use plain \tcode{stat} to
// define variable
int stat(struct stat*); // redeclare \tcode{stat} as function
void f() {
struct stat* ps; // \tcode{struct} prefix needed
// to name \tcode{struct stat}
stat(ps); // call \tcode{stat()}
}
\end{codeblock}
\exitexample
\indextext{class~name!elaborated}%
\indextext{declaration!forward class}%
A \grammarterm{declaration} consisting solely of \grammarterm{class-key
identifier;} is either a redeclaration of the name in the current scope
or a forward declaration of the identifier as a class name. It
introduces the class name into the current scope.
\enterexample
\begin{codeblock}
struct s { int a; };
void g() {
struct s; // hide global \tcode{struct s}
// with a block-scope declaration
s* p; // refer to local \tcode{struct s}
struct s { char* p; }; // define local \tcode{struct s}
struct s; // redeclaration, has no effect
}
\end{codeblock}
\exitexample
\enternote
Such declarations allow definition of classes that refer to each other.
\indextext{example!friend}%
\enterexample
\begin{codeblock}
class Vector;
class Matrix {
// ...
friend Vector operator*(const Matrix&, const Vector&);
};
class Vector {
// ...
friend Vector operator*(const Matrix&, const Vector&);
};
\end{codeblock}
Declaration of \tcode{friend}s is described in~\ref{class.friend},
operator functions in~\ref{over.oper}.
\exitexample
\exitnote
\pnum
\indextext{class~name!elaborated}%
\indextext{elaborated~type~specifier|see{class name, elaborated}}%
\enternote
An \grammarterm{elaborated-type-specifier}~(\ref{dcl.type.elab}) can also
be used as a \grammarterm{type-specifier} as part of a declaration. It
differs from a class declaration in that if a class of the elaborated
name is in scope the elaborated name will refer to it.
\exitnote
\enterexample
\begin{codeblock}
struct s { int a; };
void g(int s) {
struct s* p = new struct s; // global \tcode{s}
p->a = s; // parameter \tcode{s}
}
\end{codeblock}
\exitexample
\pnum
\indextext{class~name!point~of declaration}%
\enternote
The declaration of a class name takes effect immediately after the
\grammarterm{identifier} is seen in the class definition or
\grammarterm{elaborated-type-specifier}. For example,
\begin{codeblock}
class A * A;
\end{codeblock}
first specifies \tcode{A} to be the name of a class and then redefines
it as the name of a pointer to an object of that class. This means that
the elaborated form \tcode{class} \tcode{A} must be used to refer to the
class. Such artistry with names can be confusing and is best avoided.
\exitnote
\pnum
\indextext{class~name!\idxcode{typedef}}%
A \grammarterm{typedef-name}~(\ref{dcl.typedef}) that names a class type,
or a cv-qualified version thereof, is also a \grammarterm{class-name}. If a
\grammarterm{typedef-name} that names a cv-qualified class type is used
where a \grammarterm{class-name} is required, the cv-qualifiers are
ignored. A \grammarterm{typedef-name} shall not be used as the
\grammarterm{identifier} in a \grammarterm{class-head}.
\rSec1[class.mem]{Class members}%
\indextext{declaration!member}%
\indextext{data~member|see{member}}
\begin{bnf}
\nontermdef{member-specification}\br
member-declaration member-specification\opt\br
access-specifier \terminal{:} member-specification\opt
\end{bnf}
\begin{bnf}
\nontermdef{member-declaration}\br
attribute-specifier-seq\opt decl-specifier-seq\opt member-declarator-list\opt \terminal{;}\br
function-definition\br
using-declaration\br
static_assert-declaration\br
template-declaration\br
alias-declaration\br
empty-declaration
\end{bnf}
\begin{bnf}
\nontermdef{member-declarator-list}\br
member-declarator\br
member-declarator-list \terminal{,} member-declarator
\end{bnf}
\begin{bnf}
\nontermdef{member-declarator}\br
declarator virt-specifier-seq\opt pure-specifier\opt\br
declarator brace-or-equal-initializer\opt\br
identifier\opt attribute-specifier-seq\opt \terminal{:} constant-expression
\end{bnf}
\begin{bnf}
\nontermdef{virt-specifier-seq}\br
virt-specifier\br
virt-specifier-seq virt-specifier
\end{bnf}
\begin{bnf}
\nontermdef{virt-specifier}\br
\terminal{override}\br
\terminal{final}
\end{bnf}
\begin{bnf}
\nontermdef{pure-specifier}\br
\terminal{= 0}
\end{bnf}
\pnum
\indextext{definition!class}%
The \grammarterm{member-specification} in a class definition declares the
full set of members of the class; no member can be added elsewhere.
Members of a class are data members, member
functions~(\ref{class.mfct}), nested types, and enumerators. Data
members and member functions are static or non-static;
see~\ref{class.static}. Nested types are
classes~(\ref{class.name},~\ref{class.nest}) and
enumerations~(\ref{dcl.enum}) defined in the class, and arbitrary types
declared as members by use of a typedef declaration~(\ref{dcl.typedef}).
The enumerators of an unscoped enumeration~(\ref{dcl.enum}) defined in the class
are members of the class. Except when used to declare
friends~(\ref{class.friend}), to declare an unnamed bit-field~(\ref{class.bit}),
or to introduce the name of a member of a
base class into a derived
class~(\ref{namespace.udecl}), or when the declaration is an
\grammarterm{empty-declaration},
\grammarterm{member-declaration}{s} declare members of the class, and each
such \grammarterm{member-declaration} shall declare at least one member
name of the class. A member shall not be declared twice in the
\grammarterm{member-specification}, except that a nested class or member
class template can be declared and then later defined, and except that an
enumeration can be introduced with an \grammarterm{opaque-enum-declaration} and later
redeclared with an \grammarterm{enum-specifier}{}.
\pnum
\indextext{completely~defined}%
A class is considered a completely-defined object
type~(\ref{basic.types}) (or complete type) at the closing \tcode{}} of
the \grammarterm{class-specifier}.
Within the class
\grammarterm{member-specification}, the class is regarded as complete
within function bodies, default arguments,
\grammarterm{using-declaration}{s} introducing inheriting
constructors~(\ref{class.inhctor}),
\grammarterm{exception-specification}{s}, and
\grammarterm{brace-or-equal-initializer}{s} for non-static data members
(including such things in nested classes).
Otherwise it is regarded as incomplete within its own class
\grammarterm{member-specification}.
\pnum
\enternote
A single name can denote several function members provided their types
are sufficiently different (Clause~\ref{over}).
\exitnote
\pnum
A \grammarterm{brace-or-equal-initializer} shall appear only in the
declaration of a data member. (For static data members,
see~\ref{class.static.data}; for non-static data members,
see~\ref{class.base.init}).
A \grammarterm{brace-or-equal-initializer} for a non-static data member
shall not directly or indirectly cause the implicit definition of a
defaulted default constructor for the enclosing class or the
exception specification of that constructor.
\pnum
A member shall not be declared with the \tcode{extern}
or \tcode{register}
\nonterminal{storage-class-specifier}. Within a class definition, a member shall not be declared with the \tcode{thread_local} \nonterminal{storage-class-specifier} unless also declared \tcode{static}.
\pnum
The \grammarterm{decl-specifier-seq} may be omitted in constructor, destructor,
and conversion function declarations only;
when declaring another kind of member the \grammarterm{decl-specifier-seq}
shall contain a \grammarterm{type-specifier} that is not a \grammarterm{cv-qualifier}.
The
\grammarterm{member-declarator-list} can be omitted only after a
\grammarterm{class-specifier} or an \grammarterm{enum-specifier} or in a
\tcode{friend} declaration~(\ref{class.friend}). A
\grammarterm{pure-specifier} shall be used only in the declaration of a
virtual function~(\ref{class.virtual}).
\pnum
The optional \grammarterm{attribute-specifier-seq} in a \grammarterm{member-declaration}
appertains to each of the entities declared by the \grammarterm{member-declarator}{s};
it shall not appear if the optional \grammarterm{member-declarator-list} is omitted.
\pnum
A \grammarterm{virt-specifier-seq} shall contain at most one of each
\grammarterm{virt-specifier}.
A \grammarterm{virt-specifier-seq}
shall appear only in the declaration of a virtual member
function~(\ref{class.virtual}).
\pnum
\indextext{class~object!member}%
Non-\tcode{static}~(\ref{class.static}) data members shall not have
incomplete types. In particular, a class \tcode{C} shall not contain a
non-static member of class \tcode{C}, but it can contain a pointer or
reference to an object of class \tcode{C}.
\pnum
\enternote
See~\ref{expr.prim} for restrictions on the use of non-static data
members and non-static member functions.
\exitnote
\pnum
\enternote
The type of a non-static member function is an ordinary function type,
and the type of a non-static data member is an ordinary object type.
There are no special member function types or data member types.
\exitnote
\pnum
\indextext{example!class~definition}%
\enterexample
A simple example of a class definition is
\begin{codeblock}
struct tnode {
char tword[20];
int count;
tnode* left;
tnode* right;
};
\end{codeblock}
which contains an array of twenty characters, an integer, and two
pointers to objects of the same type. Once this definition has been
given, the declaration
\begin{codeblock}
tnode s, sp;
\end{codeblock}
declares \tcode{s} to be a \tcode{tnode} and \tcode{sp} to be a pointer
to a \tcode{tnode}. With these declarations, \tcode{sp->count} refers to
the \tcode{count} member of the object to which \tcode{sp} points;
\tcode{s.left} refers to the \tcode{left} subtree pointer of the object
\tcode{s}; and \tcode{s.right->tword[0]} refers to the initial character
of the \tcode{tword} member of the \tcode{right} subtree of \tcode{s}.
\exitexample
\pnum
\indextext{layout!class~object}%
Nonstatic data members of a (non-union) class
with the same access control (Clause~\ref{class.access})
are allocated so that later
members have higher addresses within a class object.
\indextext{allocation!unspecified}%
The order of allocation of non-static data members
with different access control
is unspecified (Clause~\ref{class.access}).
Implementation alignment requirements might cause two adjacent members
not to be allocated immediately after each other; so might requirements
for space for managing virtual functions~(\ref{class.virtual}) and
virtual base classes~(\ref{class.mi}).
\pnum
If \tcode{T} is the name of a class, then each of the following shall
have a name different from \tcode{T}:
\begin{itemize}
\item every static data member of class \tcode{T};
\item every member function of class \tcode{T}
\enternote
This restriction does not apply to constructors, which do not have
names~(\ref{class.ctor})
\exitnote;
\item every member of class \tcode{T} that is itself a type;
\item every member template of class \tcode{T};
\item every enumerator of every member of class \tcode{T} that is an
unscoped enumerated type; and
\item every member of every anonymous union that is a member of class
\tcode{T}.
\end{itemize}
\pnum
In addition, if class \tcode{T} has a user-declared
constructor~(\ref{class.ctor}), every non-static data member of class
\tcode{T} shall have a name different from \tcode{T}.
\pnum
The \defn{common initial sequence} of two standard-layout struct (Clause~\ref{class})
types is the longest sequence of non-static data
members and bit-fields in declaration order, starting with the first
such entity in each of the structs, such that corresponding entities
have layout-compatible types and either neither entity is a bit-field or
both are bit-fields with the same width.
\enterexample
\begin{codeblock}
struct A { int a; char b; };
struct B { const int b1; volatile char b2; };
struct C { int c; unsigned : 0; char b; };
struct D { int d; char b : 4; };
struct E { unsigned int e; char b; };
\end{codeblock}
The common initial sequence of \tcode{A} and \tcode{B} comprises all members
of either class. The common initial sequence of \tcode{A} and \tcode{C} and
of \tcode{A} and \tcode{D} comprises the first member in each case.
The common initial sequence of \tcode{A} and \tcode{E} is empty.
\exitexample
\pnum
Two standard-layout struct (Clause~\ref{class}) types are layout-compatible if
their common initial sequence comprises all members and bit-fields of
both classes~(\ref{basic.types}).
\pnum
Two standard-layout unions are layout-compatible if they
have the same number of non-static data members and corresponding
non-static data members (in any order) have layout-compatible
types~(\ref{basic.types}).
\pnum
In a standard-layout union with an active member~(\ref{class.union})
of struct type \tcode{T1}, it is permitted to read a non-static
data member \tcode{m} of another union member of struct type \tcode{T2}
provided \tcode{m} is part of the common initial sequence of \tcode{T1} and \tcode{T2}.
\enternote
Reading a volatile object through a non-volatile glvalue has
undefined behavior (\ref{dcl.type.cv}).
\exitnote
\pnum
If a standard-layout class object has any non-static data members, its address
is the same as the address of its first non-static data member. Otherwise, its
address is the same as the address of its first base class subobject (if any).
\enternote
There might therefore be unnamed padding within a standard-layout struct object, but
not at its beginning, as necessary to achieve appropriate alignment.
\exitnote
\rSec1[class.mfct]{Member functions}%
\indextext{member function!class}
\pnum
Functions declared in the definition of a class, excluding those
declared with a \tcode{friend} specifier~(\ref{class.friend}), are
called member functions of that class. A member function may be declared
\tcode{static} in which case it is a \term{static} member function
of its class~(\ref{class.static}); otherwise it is a
\grammarterm{non-static} member function of its
class~(\ref{class.mfct.non-static},~\ref{class.this}).
\pnum
\indextext{member function!inline}%
\indextext{definition!member~function}%
A member function may be defined~(\ref{dcl.fct.def}) in its class
definition, in which case it is an \term{inline} member
function~(\ref{dcl.fct.spec}), or it may be defined outside of its class
definition if it has already been declared but not defined in its class
definition. A member function definition that appears outside of the
class definition shall appear in a namespace scope enclosing the class
definition. Except for member function definitions that appear outside
of a class definition, and except for explicit specializations of member
functions of class templates and member function
templates~(\ref{temp.spec}) appearing outside of the class definition, a
member function shall not be redeclared.
\pnum
An \tcode{inline} member function (whether static or non-static) may
also be defined outside of its class definition provided either its
declaration in the class definition or its definition outside of the
class definition declares the function as \tcode{inline}.
\enternote
Member functions of a class in namespace scope have the linkage of that class.
Member functions of a local class~(\ref{class.local}) have no linkage.
See~\ref{basic.link}.
\exitnote
\pnum
There shall be at most one definition of a non-inline member function in
a program; no diagnostic is required. There may be more than one
\tcode{inline} member function definition in a program.
See~\ref{basic.def.odr} and~\ref{dcl.fct.spec}.
\pnum
\indextext{operator!scope~resolution}%
If the definition of a member function is lexically outside its class
definition, the member function name shall be qualified by its class
name using the \tcode{::} operator.
\enternote
A name used in a member function definition (that is, in the
\grammarterm{parameter-declaration-clause} including the default
arguments~(\ref{dcl.fct.default}) or in the member function body) is looked up
as described in~\ref{basic.lookup}.
\exitnote
\enterexample
\begin{codeblock}
struct X {
typedef int T;
static T count;
void f(T);
};
void X::f(T t = count) { }
\end{codeblock}
The member function \tcode{f} of class \tcode{X} is defined in global
scope; the notation \tcode{X::f} specifies that the function \tcode{f}
is a member of class \tcode{X} and in the scope of class \tcode{X}. In
the function definition, the parameter type \tcode{T} refers to the
typedef member \tcode{T} declared in class \tcode{X} and the default
argument \tcode{count} refers to the static data member \tcode{count}
declared in class \tcode{X}.
\exitexample
\pnum
A \tcode{static} local variable in a member function always refers to
the same object, whether or not the member function is \tcode{inline}.
\pnum
Previously declared member functions may be mentioned in \tcode{friend} declarations.
\pnum
\indextext{local~class!member~function~in}%
Member functions of a local class shall be defined inline in their class
definition, if they are defined at all.
\pnum
\enternote
A member function can be declared (but not defined) using a typedef for
a function type. The resulting member function has exactly the same type
as it would have if the function declarator were provided explicitly,
see~\ref{dcl.fct}. For example,
\begin{codeblock}
typedef void fv(void);
typedef void fvc(void) const;
struct S {
fv memfunc1; // equivalent to: \tcode{void memfunc1(void);}
void memfunc2();
fvc memfunc3; // equivalent to: \tcode{void memfunc3(void) const;}
};
fv S:: pmfv1 = &S::memfunc1;
fv S::* pmfv2 = &S::memfunc2;
fvc S::* pmfv3 = &S::memfunc3;
\end{codeblock}
Also see~\ref{temp.arg}.
\exitnote
\rSec2[class.mfct.non-static]{Nonstatic member functions}%
\indextext{member function!nonstatic}
\pnum
A \grammarterm{non-static} member function may be called for an object of
its class type, or for an object of a class derived
(Clause~\ref{class.derived}) from its class type, using the class member
access syntax~(\ref{expr.ref},~\ref{over.match.call}). A non-static
member function may also be called directly using the function call
syntax~(\ref{expr.call},~\ref{over.match.call}) from within
the body of a member function of its class or of a class derived from
its class.
\pnum
\indextext{member function!call undefined}%
If a non-static member function of a class \tcode{X} is called for an
object that is not of type \tcode{X}, or of a type derived from
\tcode{X}, the behavior is undefined.
\pnum
When an \grammarterm{id-expression}~(\ref{expr.prim}) that is not part of a
class member access syntax~(\ref{expr.ref}) and not used to form a
pointer to member~(\ref{expr.unary.op}) is used in
a member of class \tcode{X} in a context where \tcode{this} can be
used~(\ref{expr.prim.general}),
if name
lookup~(\ref{basic.lookup}) resolves the name in the
\grammarterm{id-expression} to a non-static non-type member of some class
\tcode{C},
and if either the \grammarterm{id-expression} is potentially evaluated or
\tcode{C} is \tcode{X} or a base class of \tcode{X},
the \grammarterm{id-expression} is transformed into a class
member access expression~(\ref{expr.ref}) using
\tcode{(this)}~(\ref{class.this}) as the \grammarterm{postfix-expression}
to the left of the \tcode{.} operator.
\enternote
If \tcode{C} is not \tcode{X} or a base class of \tcode{X}, the class
member access expression is ill-formed.
\exitnote
Similarly during name lookup, when an
\grammarterm{unqualified-id}~(\ref{expr.prim}) used in the definition of a
member function for class \tcode{X} resolves to a \tcode{static} member,
an enumerator or a nested type of class \tcode{X} or of a base class of
\tcode{X}, the \grammarterm{unqualified-id} is transformed into a
\grammarterm{qualified-id}~(\ref{expr.prim}) in which the
\grammarterm{nested-name-specifier} names the class of the member function.
These transformations do not apply in the
template definition context~(\ref{temp.dep.type}).
\indextext{example!member~function}%
\enterexample
\begin{codeblock}
struct tnode {
char tword[20];
int count;
tnode left;
tnode* right;
void set(const char*, tnode* l, tnode* r);
};
void tnode::set(const char* w, tnode* l, tnode* r) {
count = strlen(w)+1;
if (sizeof(tword)<=count)
perror("tnode string too long");
strcpy(tword,w);
left = l;
right = r;
}
void f(tnode n1, tnode n2) {
n1.set("abc",&n2,0);
n2.set("def",0,0);
}
\end{codeblock}
In the body of the member function \tcode{tnode::set}, the member names
\tcode{tword}, \tcode{count}, \tcode{left}, and \tcode{right} refer to
members of the object for which the function is called. Thus, in the
call \tcode{n1.set("abc",&n2,0)}, \tcode{tword} refers to
\tcode{n1.tword}, and in the call \tcode{n2.set("def",0,0)}, it refers
to \tcode{n2.tword}. The functions \tcode{strlen}, \tcode{perror}, and
\tcode{strcpy} are not members of the class \tcode{tnode} and should be
declared elsewhere.\footnote{See, for example, \tcode{}~(\ref{c.strings}).}
\exitexample
\pnum
A non-static member function may be declared \tcode{const},
\tcode{volatile}, or \tcode{const} \tcode{volatile}. These
\grammarterm{cv-qualifiers} affect the type of the \tcode{this}
pointer~(\ref{class.this}). They also affect the function
type~(\ref{dcl.fct}) of the member function; a member function declared
\tcode{const} is a \term{const} member function, a member function
declared \tcode{volatile} is a \term{volatile} member function and a
member function declared \tcode{const} \tcode{volatile} is a
\term{const volatile} member function.
\enterexample
\begin{codeblock}
struct X {
void g() const;
void h() const volatile;
};
\end{codeblock}
\tcode{X::g} is a \tcode{const} member function and \tcode{X::h} is a
\tcode{const} \tcode{volatile} member function.
\exitexample
\pnum
A non-static member function may be declared with a \grammarterm{ref-qualifier}~(\ref{dcl.fct}); see~\ref{over.match.funcs}.
\pnum
A non-static member function may be declared
\term{virtual}~(\ref{class.virtual}) or \term{pure virtual}~(\ref{class.abstract}).
\rSec2[class.this]{The \tcode{this} pointer}%
\indextext{\idxcode{this}}
\indextext{member function!\idxcode{this}}
\pnum
\indextext{this pointer@\tcode{this}~pointer|see{\tcode{this}}}%
In the body of a non-static~(\ref{class.mfct}) member function, the
keyword \tcode{this} is a prvalue expression whose value is the
address of the object for which the function is called.
\indextext{\idxcode{this}!type~of}%
The type of \tcode{this} in a member function of a class \tcode{X} is
\tcode{X*}.
\indextext{member function!\idxcode{const}}%
If the member function is declared \tcode{const}, the type of
\tcode{this} is \tcode{const} \tcode{X*},
\indextext{member function!\idxcode{volatile}}%
if the member function is declared \tcode{volatile}, the type of
\tcode{this} is \tcode{volatile} \tcode{X*}, and if the member function
is declared \tcode{const} \tcode{volatile}, the type of \tcode{this} is
\tcode{const} \tcode{volatile} \tcode{X*}.
\indextext{member function!\idxcode{const}}%
\enternote thus in a \tcode{const} member function, the object for which the function is
called is accessed through a \tcode{const} access path. \exitnote
\enterexample
\begin{codeblock}
struct s {
int a;
int f() const;
int g() { return a++; }
int h() const { return a++; } // error
};
int s::f() const { return a; }
\end{codeblock}
The \tcode{a++} in the body of \tcode{s::h} is ill-formed because it
tries to modify (a part of) the object for which \tcode{s::h()} is
called. This is not allowed in a \tcode{const} member function because
\tcode{this} is a pointer to \tcode{const}; that is, \tcode{this} has
\tcode{const} type.
\exitexample
\pnum
Similarly, \tcode{volatile} semantics~(\ref{dcl.type.cv}) apply in
\tcode{volatile} member functions when accessing the object and its
non-static data members.
\pnum
A \grammarterm{cv-qualified} member function can be called on an
object-expression~(\ref{expr.ref}) only if the object-expression is as
cv-qualified or less-cv-qualified than the member function.
\enterexample
\begin{codeblock}
void k(s& x, const s& y) {
x.f();
x.g();
y.f();
y.g(); // error
}
\end{codeblock}
The call \tcode{y.g()} is ill-formed because \tcode{y} is \tcode{const}
and \tcode{s::g()} is a non-\tcode{const} member function, that is,
\tcode{s::g()} is less-qualified than the object-expression \tcode{y}.
\exitexample
\pnum
\indextext{\idxcode{const}!constructor~and}%
\indextext{\idxcode{const}!destructor~and}%
\indextext{\idxcode{volatile}!constructor~and}%
\indextext{\idxcode{volatile}!destructor~and}%
Constructors~(\ref{class.ctor}) and destructors~(\ref{class.dtor}) shall
not be declared \tcode{const}, \tcode{volatile} or \tcode{const}
\tcode{volatile}. \enternote However, these functions can be invoked to
create and destroy objects with cv-qualified types,
see~(\ref{class.ctor}) and~(\ref{class.dtor}).
\exitnote
\rSec1[class.static]{Static members}%
\indextext{member!static}%
\indextext{member function!static}%
\pnum
A data or function member of a class may be declared \tcode{static} in a
class definition, in which case it is a \term{static member} of the class.
\pnum
A \tcode{static} member \tcode{s} of class \tcode{X} may be referred to
using the \grammarterm{qualified-id} expression \tcode{X::s}; it is not
necessary to use the class member access syntax~(\ref{expr.ref}) to
refer to a \tcode{static} member. A \tcode{static} member may be
referred to using the class member access syntax, in which case the
object expression is evaluated.
\enterexample
\begin{codeblock}
struct process {
static void reschedule();
};
process& g();
void f() {
process::reschedule(); // OK: no object necessary
g().reschedule(); // \tcode{g()} is called
}
\end{codeblock}
\exitexample
\pnum
A \tcode{static} member may be referred to directly in the scope of its
class or in the scope of a class derived (Clause~\ref{class.derived})
from its class; in this case, the \tcode{static} member is referred to
as if a \grammarterm{qualified-id} expression was used, with the
\grammarterm{nested-name-specifier} of the \grammarterm{qualified-id} naming
the class scope from which the static member is referenced.
\enterexample
\begin{codeblock}
int g();
struct X {
static int g();
};
struct Y : X {
static int i;
};
int Y::i = g(); // equivalent to \tcode{Y::g();}
\end{codeblock}
\exitexample
\pnum
If an \grammarterm{unqualified-id}~(\ref{expr.prim}) is used in the
definition of a \tcode{static} member following the member's
\grammarterm{declarator-id}, and name lookup~(\ref{basic.lookup.unqual})
finds that the \grammarterm{unqualified-id} refers to a \tcode{static}
member, enumerator, or nested type of the member's class (or of a base
class of the member's class), the \grammarterm{unqualified-id} is
transformed into a \grammarterm{qualified-id} expression in which the
\grammarterm{nested-name-specifier} names the class scope from which the
member is referenced.
\enternote
See~\ref{expr.prim} for restrictions on the use of non-static data
members and non-static member functions.
\exitnote
\pnum
Static members obey the usual class member access rules
(Clause~\ref{class.access}). When used in the declaration of a class
member, the \tcode{static} specifier shall only be used in the member
declarations that appear within the \grammarterm{member-specification} of
the class definition.
\enternote
It cannot be specified in member declarations that appear in namespace scope.
\exitnote
\rSec2[class.static.mfct]{Static member functions}
\indextext{member function!static}%
\pnum
\enternote
The rules described in~\ref{class.mfct} apply to \tcode{static} member
functions.
\exitnote
\pnum
\enternote
A \tcode{static} member function does not have a \tcode{this}
pointer~(\ref{class.this}).
\exitnote
A \tcode{static} member function shall not be \tcode{virtual}. There
shall not be a \tcode{static} and a non-static member function with the
same name and the same parameter types~(\ref{over.load}). A
\tcode{static} member function shall not be declared \tcode{const},
\tcode{volatile}, or \tcode{const volatile}.
\rSec2[class.static.data]{Static data members}
\indextext{member~data!static}%
\pnum
A \tcode{static} data member is not part of the subobjects of a class. If a
\tcode{static} data member is declared \tcode{thread_local} there is one copy of
the member per thread. If a \tcode{static} data member is not declared
\tcode{thread_local} there is one copy of the data member that is shared by all
the objects of the class.
\pnum
\indextext{initialization!static member}%
\indextext{definition!static member}%
The declaration of a \tcode{static} data member in its class definition
is not a definition and may be of an incomplete type other than
cv-qualified \tcode{void}. The definition for a \tcode{static} data
member shall appear in a namespace scope enclosing the member's class
definition.
\indextext{operator~use!scope~resolution}%
In the definition at namespace scope, the name of the \tcode{static}
data member shall be qualified by its class name using the \tcode{::}
operator. The \grammarterm{initializer} expression in the definition of a
\tcode{static} data member is in the scope of its
class~(\ref{basic.scope.class}).
\indextext{example!static@\tcode{static} member}%
\enterexample
\begin{codeblock}
class process {
static process run_chain;
static process* running;
};
process* process::running = get_main();
process* process::run_chain = running;
\end{codeblock}
The \tcode{static} data member \tcode{run_chain} of class
\tcode{process} is defined in global scope; the notation
\tcode{process\colcol{}run_chain} specifies that the member \tcode{run_chain}
is a member of class \tcode{process} and in the scope of class
\tcode{process}. In the \tcode{static} data member definition, the
\grammarterm{initializer} expression refers to the \tcode{static} data
member \tcode{running} of class \tcode{process}.
\exitexample
\enternote
Once the \tcode{static} data member has been defined, it exists even if
no objects of its class have been created.
\enterexample
in the example above, \tcode{run_chain} and \tcode{running} exist even
if no objects of class \tcode{process} are created by the program.
\exitexample
\exitnote
\pnum
If a non-volatile \tcode{const} \tcode{static} data member is
of integral or enumeration type,
its declaration in the class definition can specify a
\grammarterm{brace-or-equal-initializer} in which every
\grammarterm{initializer-clause} that is an \grammarterm{assignment-expression}
is a constant expression~(\ref{expr.const}). A \tcode{static} data member of
literal type can be declared in the class definition with the
\tcode{constexpr} specifier; if so, its declaration shall specify a
\grammarterm{brace-or-equal-initializer} in which every
\grammarterm{initializer-clause} that is an \grammarterm{assignment-expression}
is a constant expression. \enternote In both these cases,
the member may appear in constant expressions. \exitnote The
member shall still be defined in a namespace scope if
it is odr-used~(\ref{basic.def.odr}) in the program and the
namespace scope definition shall not contain an \grammarterm{initializer}.
\pnum
\enternote
There shall be exactly one definition of a \tcode{static} data member
that is odr-used~(\ref{basic.def.odr}) in a program; no diagnostic is required.
\exitnote
Unnamed classes and classes contained directly
or indirectly within unnamed classes shall not contain \tcode{static}
data members.
\pnum
\indextext{restriction!static@\tcode{static} member local~class}%
\tcode{Static} data members of a class in namespace scope have
the linkage of that class~(\ref{basic.link}). A local class shall not have \tcode{static}
data members.
\pnum
\tcode{Static} data members are initialized and destroyed exactly like
non-local variables~(\ref{basic.start.init},~\ref{basic.start.term}).
\pnum
A \tcode{static} data member shall not be
\tcode{mutable}~(\ref{dcl.stc}).
\rSec1[class.union]{Unions}%
\indextext{\idxcode{union}}
\pnum
In a union, at most one of the non-static data members can be active at any
time, that is, the value of at most one of the non-static data members can be
stored in a union at any time. \enternote One special guarantee is made in order to
simplify the use of unions: If a standard-layout union contains several standard-layout
structs that share a common initial sequence~(\ref{class.mem}), and if an object of this
standard-layout union type contains one of the standard-layout structs, it is permitted
to inspect the common initial sequence of any of standard-layout struct members;
see~\ref{class.mem}. \exitnote The size of a union is sufficient to contain the largest
of its non-static data members. Each non-static data member is allocated
as if it were the sole member of a struct. All non-static data members of a
union object have the same address.
\pnum
\indextext{member function!\idxcode{union}}%
\indextext{constructor!\idxcode{union}}%
\indextext{destructor!\idxcode{union}}%
A union can have member functions (including constructors and destructors),
\indextext{restriction!\idxcode{union}}%
but it shall not have virtual~(\ref{class.virtual}) functions. A union shall not have
base classes. A union shall not be used as a base class.
\indextext{restriction!\idxcode{union}}%
If a union contains a non-static data member of
reference type the program is ill-formed.
\enternote If any non-static data member of a union has a non-trivial
default constructor~(\ref{class.ctor}),
copy constructor~(\ref{class.copy}),
move constructor~(\ref{class.copy}),
copy assignment operator~(\ref{class.copy}),
move assignment operator~(\ref{class.copy}),
or destructor~(\ref{class.dtor}), the corresponding member function
of the union must be user-provided or it will
be implicitly deleted~(\ref{dcl.fct.def.delete}) for the union. \exitnote
\pnum
\enterexample Consider the following union:
\begin{codeblock}
union U {
int i;
float f;
std::string s;
};
\end{codeblock}
Since \tcode{std::string}~(\ref{string.classes}) declares non-trivial versions of all of the special
member functions, \tcode{U} will have an implicitly deleted default constructor,
copy/move constructor,
copy/move assignment operator, and destructor.
To use \tcode{U}, some or all of these member functions
must be user-provided.\exitexample
\pnum
\enternote In general, one must use explicit destructor calls and placement
new operators to change the active member of a union. \exitnote
\enterexample
Consider an object \tcode{u} of a \tcode{union} type \tcode{U} having non-static data members
\tcode{m} of type \tcode{M} and \tcode{n} of type \tcode{N}. If \tcode{M} has a non-trivial
destructor and \tcode{N} has a non-trivial constructor (for instance, if they declare or inherit
virtual functions), the active member of \tcode{u} can be safely switched from \tcode{m} to
\tcode{n} using the destructor and placement new operator as follows:
\begin{codeblock}
u.m.~M();
new (&u.n) N;
\end{codeblock}
\exitexample
\pnum
\indextext{\idxcode{union}!anonymous}%
A union of the form
\begin{ncbnftab}
\terminal{union} \terminal{{} member-specification \terminal{}} \terminal{;}
\end{ncbnftab}
is called an \defn{anonymous union}; it defines an unnamed object of unnamed
type. Each \grammarterm{member-declaration} in the \grammarterm{member-specification}
of an anonymous union shall either define a non-static data member or be a
\grammarterm{static_assert-declaration}.
\enternote
Nested types, anonymous unions, and functions cannot be declared within an anonymous
union.
\exitnote
The names of the members of an anonymous union shall be distinct from
the names of any other entity in the scope in which the anonymous union
is declared. For the purpose of name lookup, after the anonymous union
definition, the members of the anonymous union are considered to have
been defined in the scope in which the anonymous union is declared.
\indextext{initialization!\idxcode{union}}%
\enterexample
\begin{codeblock}
void f() {
union { int a; const char* p; };
a = 1;
p = "Jennifer";
}
\end{codeblock}
Here \tcode{a} and \tcode{p} are used like ordinary (nonmember)
variables, but since they are union members they have the same address.
\exitexample
\pnum
\indextext{\idxcode{union}!global anonymous}%
\indextext{scope!anonymous \tcode{union}~at namespace}%
Anonymous unions declared in a named namespace or in the global
namespace shall be declared \tcode{static}. Anonymous unions declared at
block scope shall be declared with any storage class allowed for a
block-scope variable, or with no storage class. A storage class is not
allowed in a declaration of an anonymous union in a class scope.
\indextext{access~control!anonymous \tcode{union}}%
\indextext{restriction!anonymous \tcode{union}}%
An anonymous union shall not have \tcode{private} or \tcode{protected}
members (Clause~\ref{class.access}). An anonymous union shall not have
function members.
\pnum
A union for which objects, pointers, or references are declared is not an anonymous union.
\enterexample
\begin{codeblock}
void f() {
union { int aa; char* p; } obj, ptr = &obj;
aa = 1; // error
ptr->aa = 1; // OK
}
\end{codeblock}
The assignment to plain \tcode{aa} is ill-formed since the member name
is not visible outside the union, and even if it were visible, it is not
associated with any particular object.
\exitexample
\enternote
Initialization of unions with no user-declared constructors is described
in~(\ref{dcl.init.aggr}).
\exitnote
\pnum
A \term{union-like class} is a union or a class that has an anonymous union as a direct
member. A union-like class \tcode{X} has a set of \term{variant members}.
If \tcode{X} is a union, a non-static data member of \tcode{X} that is not an anonymous
union is a variant member of \tcode{X}. In addition, a non-static data member of an
anonymous union that is a member of \tcode{X} is also a variant member of \tcode{X}.
At most one variant member of a union may have a \grammarterm{brace-or-equal-initializer}.
\enterexample
\begin{codeblock}
union U {
int x = 0;
union {
int k;
};
union {
int z;
int y = 1; // error: initialization for second variant member of \tcode{U}
};
};
\end{codeblock}
\exitexample
\rSec1[class.bit]{Bit-fields}%
\indextext{bit-field}
\pnum
A \grammarterm{member-declarator} of the form
\begin{ncbnftab}
identifier\opt attribute-specifier-seq\opt \terminal{:} constant-expression
\end{ncbnftab}
\indextext{\idxcode{:}!field declaration}%
\indextext{declaration!bit-field}%
specifies a bit-field;
its length is set off from the bit-field name by a colon. The optional \grammarterm{attribute-specifier-seq} appertains to the entity being declared. The bit-field
attribute is not part of the type of the class member. The
\grammarterm{constant-expression} shall be an integral constant expression
with a value greater than or equal to zero. The
value of the integral constant expression may
be larger than the number of bits in the object
representation~(\ref{basic.types}) of the bit-field's type; in such
cases the extra bits are used as padding bits and do not participate in
the value representation~(\ref{basic.types}) of the bit-field.
\indextext{allocation!implementation~defined bit-field}%
Allocation of bit-fields within a class object is
\impldef{allocation of bit-fields within a class object}.
\indextext{bit-field!implementation~defined alignment~of}%
Alignment of bit-fields is \impldef{alignment of bit-fields within a class object}.
\indextext{layout!bit-field}%
Bit-fields are packed into some addressable allocation unit.
\enternote
Bit-fields straddle allocation units on some machines and not on others.
Bit-fields are assigned right-to-left on some machines, left-to-right on
others.
\exitnote
\pnum
\indextext{bit-field!unnamed}%
A declaration for a bit-field that omits the \grammarterm{identifier}
declares an \grammarterm{unnamed} bit-field. Unnamed bit-fields are not
members and cannot be initialized.
\enternote
An unnamed bit-field is useful for padding to conform to
externally-imposed layouts.
\exitnote
\indextext{bit-field!zero~width~of}%
\indextext{bit-field!alignment~of}%
As a special case, an unnamed bit-field with a width of zero specifies
alignment of the next bit-field at an allocation unit boundary. Only
when declaring an unnamed bit-field may the value of the
\grammarterm{constant-expression} be equal to zero.
\pnum
\indextext{bit-field!type~of}%
A bit-field shall not be a static member. A bit-field shall have
integral or enumeration type~(\ref{basic.fundamental}).
\indextext{Boolean}%
A \tcode{bool} value can successfully be stored in a bit-field of any
nonzero size.
\indextext{bit-field!address~of}%
The address-of operator \tcode{&} shall not be applied to a bit-field,
so there are no pointers to bit-fields.
\indextext{restriction!bit-field}%
\indextext{restriction!address~of bit-field}%
\indextext{restriction!pointer~to bit-field}%
A non-const reference shall not be bound to a
bit-field~(\ref{dcl.init.ref}).
\enternote
If the initializer for a reference of type \tcode{const} \tcode{T&} is
an lvalue that refers to a bit-field, the reference is bound to a
temporary initialized to hold the value of the bit-field; the reference
is not bound to the bit-field directly. See~\ref{dcl.init.ref}.
\exitnote
\pnum
If the value \tcode{true} or \tcode{false} is stored into a bit-field of
type \tcode{bool} of any size (including a one bit bit-field), the
original \tcode{bool} value and the value of the bit-field shall compare
equal. If the value of an enumerator is stored into a bit-field of the
same enumeration type and the number of bits in the bit-field is large
enough to hold all the values of that enumeration type~(\ref{dcl.enum}),
the original enumerator value and the value of the bit-field shall
compare equal.
\enterexample
\begin{codeblock}
enum BOOL { FALSE=0, TRUE=1 };
struct A {
BOOL b:1;
};
A a;
void f() {
a.b = TRUE;
if (a.b == TRUE) // yields \tcode{true}
{ / ... / }
}
\end{codeblock}
\exitexample
\rSec1[class.nest]{Nested class declarations}%
\indextext{definition!nested~class}%
\indextext{class~local|see{local~class}}%
\indextext{class~nested|see{nested~class}}
\pnum
A class can be declared within another class. A class declared within
another is called a \grammarterm{nested} class. The name of a nested class
is local to its enclosing class.
\indextext{nested~class!scope~of}%
The nested class is in the scope of its enclosing class.
\enternote
See~\ref{expr.prim} for restrictions on the use of non-static data
members and non-static member functions.
\exitnote
\indextext{example!nested~class}%
\enterexample
\begin{codeblock}
int x;
int y;
struct enclose {
int x;
static int s;
struct inner {
void f(int i) {
int a = sizeof(x); // OK: operand of sizeof is an unevaluated operand
x = i; // error: assign to \tcode{enclose::x}
s = i; // OK: assign to \tcode{enclose::s}
::x = i; // OK: assign to global \tcode{x}
y = i; // OK: assign to global \tcode{y}
}
void g(enclose p, int i) {
p->x = i; // OK: assign to \tcode{enclose::x}
}
};
};
inner* p = 0; // error: \tcode{inner} not in scope
\end{codeblock}
\exitexample
\pnum
Member functions and static data members of a nested class can be
defined in a namespace scope enclosing the definition of their class.
\indextext{example!nested~class definition}%
\enterexample
\begin{codeblock}
struct enclose {
struct inner {
static int x;
void f(int i);
};
};
int enclose::inner::x = 1;
void enclose::inner::f(int i) { /* ... / }
\end{codeblock}
\exitexample
\pnum
If class \tcode{X} is defined in a namespace scope, a nested class
\tcode{Y} may be declared in class \tcode{X} and later defined in the
definition of class \tcode{X} or be later defined in a namespace scope
enclosing the definition of class \tcode{X}.
\indextext{example!nested~class forward~declaration}%
\enterexample
\begin{codeblock}
class E {
class I1; // forward declaration of nested class
class I2;
class I1 { }; // definition of nested class
};
class E::I2 { }; // definition of nested class
\end{codeblock}
\exitexample
\pnum
\indextext{friend~function!nested~class}%
Like a member function, a friend function~(\ref{class.friend}) defined
within a nested class is in the lexical scope of that class; it obeys
the same rules for name binding as a static member function of that
class~(\ref{class.static}), but it has no special access rights to
members of an enclosing class.
\rSec1[class.local]{Local class declarations}
\indextext{declaration!local~class}%
\indextext{definition!local~class}%
\pnum
A class can be declared within a function definition; such a class is
called a \grammarterm{local} class. The name of a local class is local to
its enclosing scope.
\indextext{local~class!scope~of}%
The local class is in the scope of the enclosing scope, and has the same
access to names outside the function as does the enclosing function.
Declarations in a local class
shall not odr-use~(\ref{basic.def.odr}) a variable with automatic storage
duration from an
enclosing scope.
\enterexample
\indextext{example!local~class}%
\begin{codeblock}
int x;
void f() {
static int s ;
int x;
const int N = 5;
extern int q();
struct local {
int g() { return x; } // error: odr-use of automatic variable \tcode{x}
int h() { return s; } // OK
int k() { return ::x; } // OK
int l() { return q(); } // OK
int m() { return N; } // OK: not an odr-use
int n() { return &N; } // error: odr-use of automatic variable \tcode{N}
};
}
local* p = 0; // error: \tcode{local} not in scope
\end{codeblock}
\exitexample
\pnum
An enclosing function has no special access to members of the local
class; it obeys the usual access rules (Clause~\ref{class.access}).
\indextext{member function!local~class}%
Member functions of a local class shall be defined within their class
definition, if they are defined at all.
\pnum
\indextext{nested~class!local~class}%
If class \tcode{X} is a local class a nested class \tcode{Y} may be
declared in class \tcode{X} and later defined in the definition of class
\tcode{X} or be later defined in the same scope as the definition of
class \tcode{X}.
\indextext{restriction!local~class}%
A class nested within
a local class is a local class.
\pnum
A local class shall not have static data members.
\rSec1[class.nested.type]{Nested type names}
\indextext{type~name!nested}%
\indextext{type~name!nested!scope of}%
\pnum
Type names obey exactly the same scope rules as other names. In
particular, type names defined within a class definition cannot be used
outside their class without qualification.
\enterexample
\indextext{example!nested type~name}%
\begin{codeblock}
struct X {
typedef int I;
class Y { /* ... */ };
I a;
};
I b; // error
Y c; // error
X::Y d; // OK
X::I e; // OK
\end{codeblock}
\exitexample%
\indextext{class|)}


Fix coredump, memory leaks and uses after free

Here was big problem with uncorrect uses boundingRect - it changes without call prepareGeometryChange. So I have core dump and some other errors (and memory leaks), which I fixed.

Hi,
Did you change your mind with your PR? Or it still needs some work to be done?
Thanks
Dmitry


Add network-policy features for SIG Network

Signed-off-by: Christopher M. Luciano<EMAIL_ADDRESS>Special notes for your reviewer:

Marked as WIP so that I can add Egress notes when the PR merges

@radhikapc I think we'll want to revisit this one for edits, though -- the actual PR suggests something a bit more complex?


Add narrative and explanation in Generating Meshes

The Generating Meshes notebook currently has no explanatory text and display a pipeline which is of course not usable on the static website. Therefore it doesn't actually demonstrate what the notebook is meant to be about which is to generate meshes.

One alternative could be to move the meshing page to the end of the grabcut notebook.
The grabcut-to-mesh dashboard in AdhUI shows the deployable app version https://github.com/erdc/AdhUI/blob/master/docs/Dashboards/Grabcut_Mesher.ipynb
We can't migrate that to earthsim due to circular dependencies though. We don't have a way of hosting it, otherwise a link to that pipepline app might be beneficial in the earthsim docs.


Is there any feature so we can toggle between cluster and markers?

No, but you could add and remove the layers.

I am actually dealing with more than 2 million markers on bootleaf map in the form of cluster. If I add markers as each marker form a separate layer, my map is stucked. So I am searching for a solution where I can do it with the minimum layers possible.

PruneCluster is very much about clustering markers for Leaflet. Have you tried Deck.gl?


Runtime: Save scratch registers before calling cfuncs

Save the scratch registers before calling cfuncs. Previously, they would just be overwritten.

@tenderlove this is a working draft. It has an issue that I need to figure out on a separate session - the assembler (Fisk) doesn't release the temp vars (assuming this is the only problem :grimacing:), but it's not obvious to me why (even assuming that push/pop lock the a given temp var register, they are still within the temp var scope :thinking: ). If you can spot the problem very easily and give me a hint, that'd save me some hair - otherwise, I'll keep diggin' :smile:
The easiest way to reproduce the release problem is rake test[concatarray]. When Fisk assembles the code, it counts 4 temp vars.

Execution with debug info, without regs saving (Temp Reg):
TR_0 START:0 END:1
TR_0 START:0 END:1
TR_1 START:2 END:3
TR_2 START:8 END:9
TR_3 START:19 END:40
TR_4 START:24 END:25
TR_5 START:35 END:40

with register saving:
TR_0 START:0 END:1
TR_0 START:0 END:1
TR_1 START:2 END:3
TR_2 START:5 END:56
TR_3 START:10 END:11
TR_4 START:26 END:56
TR_5 START:32 END:33

Interesting. TR_2 and TR_3 start earlier; TR_4 lasts more. By looking atvm_concat_array code, I can see that, for example, tmp1_loc is used after invoking the first cfunc. Regs saving will cause it to be used before (I suppose).
Damn! Even if I can solve this by reorganizing the code, it means that the segfaults on other UTs are a different problem :cursing_face: :cursing_face: :cursing_face:

I've just fixed one of the segfaults; it's actually a simplification - the toregexp handler manually managed the stack when invoking a cfunc.
Thinking about it, this is not "insanely nice". If a handler invokes a cfunc without automatic alignment and uses temp vars and the temp var(s) are used, it will be confusing, since call_cfunc will push the temp var regs, changing the stack alignment, and it will be evident to the user (dev) why the stack handling is changed (in other words, a leaking abstraction).
I have the suspicion that this is an inevitable side-effect, but I haven't put careful thought. I'll proceed to squash the remaining failures anyway, then we can summarize.

The issues on this PR are caused by stack alignment. I'm quite confused, but if I get to the bottom of them, I should get the feature to work.

:thinking: I can imagine this being related:
                 # We pushed before calling the patchable jump,
                 # so this function call should already be aligned

Wow, this was one debugging session and a half :sweat_smile:.
The problem is caused by the deferred opt_aref compilation, which uses a temp var, while handling the stack in two stages.
If the temp var is automatically saved, the stack is messed up. So we need to add an option for manual temp vars preservation.

If the temp var is automatically saved, the stack is messed up. So we need to add an option for manual temp vars preservation.

😭
I wonder if we couldn't eliminate pushing REG_BP.  I know that wouldn't solve this problem in the general case (since probably people want to use temp vars??).  It looks like the reason we push this register is because when we jump from JIT ISEQ -> JIT ISEQ it would lose the base pointer (since we have to flush the real SP to the stack frame).  I think cfp->__bp__ contains the same value we're storing in REG_BP.  Maybe we could read that value in to the register on return and remove the push / pops?
I'm willing to give it a try unless you're interested.

I think I linked to the wrong thing, check this link.  Normal frame pushes seem to write the base SP in that member.

I'm willing to give it a try unless you're interested.

Yes, give it a try, please! I've almost finished my hair reserve for this functionality :joy:
I'll follow up on the fix. I have all the pieces, but there have been the typical unexpected details :scream:

OK. I've pushed the fixed version, and updated the PR description. This PR conflicts with the one I previously opened. According to which one is approved first (assuming they're both approved :grin:), I'll rebase where needed.

Rebased/conflicts solved.


JS Demo Source Code

Really great project. I tried it on a wide range of images and am super impressed.
The demo site FAQ says

The prompt encoder and mask decoder take ~50ms on CPU in the browser using multithreaded SIMD execution.

Is the JavaScript/ASM.js implementation of this open sourced anywhere? (Or is the source code of the demo site released?)

Following.

following.

flowing

following

+1

following

following

+1

If you notice, it says "the prompt encoder and mask decoder".
Prompts are the eventual areas/dots of the wanted segmentation features (aka, the "box" you grab with the browser), while the "mask" is the output of the neural network. It means that while the training and detection needs to be done server-side due to the complexity, browsers are capable of decoding the format for the output in reasonable time.

+1

following

following

following

I've managed to distill out the core of how the demo site works and packaged it up in a Chrome extension. You can find the extension here: https://github.com/kevmo314/magic-copy

And if you want to see how the entire site works, this repository recreates it. Will also include explanations of how it works as well.
https://github.com/MiscellaneousStuff/seg-annotations

very good


chore: using memory sql backend by default in risedev

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Because we are going to gradually replace the metastore from etcd to SQL backend, this PR changes risedev d to use memory sql backend as the first step. Eventually we will deprecate the kv version of metastore and replace all configs in risedev, this's just the first step.
Checklist

[ ] I have written necessary rustdoc comments
[ ] I have added necessary unit tests and integration tests
[ ] I have added test labels as necessary. See details.
[ ] I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features #7934).
[ ] My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
[ ] All checks passed in ./risedev check (or alias, ./risedev c)
[ ] My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)

[ ] My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

[ ] My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

Could you describe the motivation in PR desc?

Sure, added.

This PR also has effects on the e2e tests running in CI. For example,

ci-3cn-1fe: used to be etcd (kv), now still etcd (kv)
https://github.com/risingwavelabs/risingwave/blob/d6fe5ae87a46d429b0ff7b4696fac66bfc30edfa/risedev.yml#L637-L641
ci-3cn-3fe-in-memory: used to be in-memory (kv), now sqlites-memory (sql)
https://github.com/risingwavelabs/risingwave/blob/d6fe5ae87a46d429b0ff7b4696fac66bfc30edfa/risedev.yml#L771-L775

I'm not sure if this will lead to confusion and whether we should first review all of them carefully before changing this.
I also notice many branches like if [[ $mode == "single-node" ]]; in the e2e script. I'm wondering if this is meant to trigger a specific behavior for single-node mode or for the SQL backend.

This PR also has effects on the e2e tests running in CI. For example,

ci-3cn-1fe: used to be etcd (kv), now still etcd (kv)
https://github.com/risingwavelabs/risingwave/blob/d6fe5ae87a46d429b0ff7b4696fac66bfc30edfa/risedev.yml#L637-L641
ci-3cn-3fe-in-memory: used to be in-memory (kv), now sqlites-memory (sql)
https://github.com/risingwavelabs/risingwave/blob/d6fe5ae87a46d429b0ff7b4696fac66bfc30edfa/risedev.yml#L771-L775

I'm not sure if this will lead to confusion and whether we should first review all of them carefully before changing this.

Oh, I didn't notice that ci-3cn-3fe-in-memory has been effected. I will review all of them to see whether we can switch to sqlite memory mode. I guess it's okay.

I also notice many branches like if [[ $mode == "single-node" ]]; in the e2e script. I'm wondering if this is meant to trigger a specific behavior for single-node mode or for the SQL backend.

I think so. single-node uses a sqlite file as the sql backend. Branches like if [[ $mode == "single-node" ]]; are used to start/stop the test env and ignore some flaky tests.

Should we fix the workaround tests of single-node mode first before merging this?
These tests were failing, I recall it's the e2e visibility mode tests.
Because in this PR we start to use sql backend for normal e2e tests. I'm afraid that after it is merged, the same flaky tests will fail in our pr pipeline.

I also notice many branches like if [[ $mode == "single-node" ]]; in the e2e script. I'm wondering if this is meant to trigger a specific behavior for single-node mode or for the SQL backend.

Yes, it disables some flaky tests for single node mode.

Sorry, clicked Approve before seeing Bugen's comment

Should we fix the workaround tests of single-node mode first before merging this? These tests were failing, I recall it's the e2e visibility mode tests.
Because in this PR we start to use sql backend for normal e2e tests. I'm afraid that after it is merged, the same flaky tests will fail in our pr pipeline.

The in-memory sql backend only effects configs as follows:

java-binding-demo
ci-3cn-3fe-in-memory
ci-iceberg-test
ci-sink-test

I think it's fine to switch it for these test for now. The only remained flaky tests are:

https://github.com/risingwavelabs/risingwave/issues/16796  Still investigation, will look for some help from others.
e2e_test/background_ddl/basic.slt.

Until they get resolved then I will consider switch all CI tests to sql backend.

some flaky tests for single node mode

Is it specific to single node mode or is due to SQL backend? I suppose it's the latter.

some flaky tests for single node mode

Is it specific to single node mode or is due to SQL backend? I suppose it's the latter.

Latter.

Something else to mention is that we should probably add a ci step for etcd backend e2e tests still, at least up until the point where we deprecate it.
It is as simple as copying the e2e test step in main-cron.yml, and just changing the cluster to one which uses the etcd backend.

Personally I tend to merge this PR as long as all tests can pass.


feature: Add the ability to run dbt-docs-generate on only changed files

This is addressing https://github.com/dbt-checkpoint/dbt-checkpoint/issues/196
dbt docs generate is very slow and is a bottleneck in development. The idea is to mimic the behavior of the other cli hooks such as dbt run to pick only the changed models to be documented in order to pursue check on column documentations, tests, etc.

Any news on this one ? This is a feature we'd also like to have for our workflows

Agree what @SuperbTUM says.
@astro30 docs generate hook is one of the most used. If we call dbt docs generate with -m every time, we leave behind all users with dbt < 1.7.
Wouldn't it be better to leave both possibilities? With and without the new flag?


[Usage Question] Deserializing an var from a store

I have a Store for my view View1Store.qml
Store {
    property var view1Object // moved to store from `view1.qml`
    Filter {
        type: ActionTypes.loadViewItems
        onDispatched: {
            view1Object = message.viewItem
    }
}

And I want to serialize it into a JSON to be rendered in a qml TextArea in my View1.qml
    TextArea {
        id: recordView
        anchors{
            top: parent.top
            topMargin: 10
            left: parent.left
            leftMargin: 20
        }
        width: 200
        height: 400
        clip: true
        readOnly: true
        textFormat: TextEdit.AutoText
        text: JSON.stringify(MainStore.view1store.view1Object) // ???
    }

Am I not thinking about this correctly?
Previously when I was loading the view, I used:
stack.push(view1, { view1Object: item })

which assigned property var view1Object in view1.qml and I could just do:
    onView1ObjectChanged: {
        recordView.text = JSON.stringify(view1Object, null, 2)
     }

I believe I am thinking about this the wrong way in how the view should be related to the store

HI,
What are you worrying? I may not understand your question correctly. Basically, the method 1 is already a straightforward method. It should works pretty well in QML.
Method 2, pushing the store property (?) into a new view, it will lost the data binding and therefore will not be updated on property changes.

@benlau
In "Method 1", I'm getting:
qrc:/views/EView1.qml:58:15: Unable to assign [undefined] to QString
Which is the line:
text: JSON.stringify(MainStore.view1store.view1Object)

hmmm..
Could you try to add following lines in your source code , and what is the result?:
Component.onCompleted {
     console.log(MainStore.view1store);
     console.log(MainStore.view1store.view1Object);
     console.log(JSON.stringify(Hydrate.dehydrate(MainStore)));
}

qml: EView1Store_QMLTYPE_61(0x7fd71bcaaf40)
qml: undefined
qml: {"history":{"history":[{}],"historyCursor":0,"nextBtnEnabled":false,"prevBtnEnabled":false},"view0store":{"_lobbiesModel":{"count":0,"dynamicRoles":false,"idAttribute":"id"},"_usersModel":{"count":0,"dynamicRoles":false,"idAttribute":"id"},"history_lobbies_page":0,"history_users_page":0,"nextBtnEnabled":false,"prevBtnEnabled":false},"view1store":{"_userFriends":{"count":0,"data":[],"dynamicRoles":false},"_userLobbiesModel":{"count":0,"dynamicRoles":false,"idAttribute":"id"}}}

@jordanbaucke ,
The second and third line show that view1object is missing in view1store.
Are you using Qt 5.8/5.9 with QML cache? If yes, then I guess the cache is not updated. You may try to remove "*.qmlc" or set QML_DISABLE_DISK_CACHE to true
For example:
int main(int argc, char *argv[])
{
    qputenv("QML_DISABLE_DISK_CACHE", "true");

    QGuiApplication app(argc, argv);

    QQmlApplicationEngine engine;
    engine.load(QUrl(QStringLiteral("qrc:/main.qml")));

    return app.exec();
}

@benlau - Qt 5.6.2 (so that could be the problem!)

@benlau ,
I figured it out:
    property var view1Object: new Object


[CARBONDATA-1939] Added show segments validation test case

(1) Modified headers of show segments
(2) Modified SDV test cases for validating headers and result

[ ] Any interfaces changed?

[ ] Any backward compatibility impacted?

[ ] Document update required?

[x] Testing done
SDV test cases modified

[ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

Build Success with Spark 2.2.0, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder/1103/

Build Success with Spark 2.1.0, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder1/2320/

SDV Build Fail , Please check CI http://<IP_ADDRESS>:8080/job/ApacheSDVTests/2552/

retest sdv please

SDV Build Fail , Please check CI http://<IP_ADDRESS>:8080/job/ApacheSDVTests/2556/

Retest sdv please

SDV Build Success , Please check CI http://<IP_ADDRESS>:8080/job/ApacheSDVTests/2562/

retest this please

Build Success with Spark 2.2.0, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder/1125/

Build Success with Spark 2.1.0, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder1/2341/

LGTM


Building doesn't work

so uh, i downloaded the source code, extracted it then i did all the other steps and when i typed in dotnet build nothing happened.

the dll wasn't there and when i tried again i got a bunch of warnings and errors.

What are the errors and warnings?
PS: This mod probably doesn't work anymore.

What are the errors and warnings? PS: This mod probably doesn't work anymore.

They are mostly about the directory even though i did all of that and its still giving me errors and warnings

whoops

Can you specify the errors?

@dedouwe26 can you fix the mod?

Can you specify the errors? @BucketofWater1

mod?

Maybe

Can you specify the errors? @BucketofWater1

What version of .NET u use

Close as @BucketofWater1 is not responding


haven't  data line format make dotted or dashed ?

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Version of the library being used [e.g. 1.2.17]

Additional context
Add any other context about the problem here.

Hi @RDDSampath
You can use the strokeDashArray prop
For dotted-
strokeDashArray={[1,2]}

For dashed-
strokeDashArray={[4,6]}

ok thank you


Remove uberjar dependency

Fixes #269

@JoeHegarty lgtm, we should check the sample project after this change (ensure it has it's own slf4j logger eg. log4j2).

@gustavonalle thanks!


Added LLM services for GroqLLMService and GrokLLMService

Please describe the changes in your PR. If it is addressing an issue, please reference that as well.
The new LLM services, GroqLLMService and GrokLLMService, are subclasses of OpenAILLMService. This approach makes it easier to integrate LLM services that use OpenAI-compatible APIs. While Groq maintains full OpenAI compatibility without requiring additional customization, Grok requires custom token metrics handling to aggregate incremental token updates into a final summary.
Also, updated AzureLLMService to follow the same pattern. And, updated AzureLLMService to use the latest api_version: 2024-09-01-preview.

LGTM!


Turning off Timestamps

I was wondering if it's possible to quickly turn off the timestamps in config.ini
In this section
[Misc]
hour24 = true

If I undesrtand correctly I can set it to false to create a 12 hour format, and of course "true" keeps it in a 24 hour format
I'd like to turn it off
I've tried the following things

commenting it out
deleting that line
both of these return an error

I've also tried
hour24 = None
hour24 = none
hour24 = null
hour24 =

but I can't seem to get it to hide the time-stamps
This might be a quick solution, but unfortunatly I couldn't figure it out
Thanks!

interesting, I never thought someone wld want to turn them off, No worries I will add it just give me a couple of hours

Done in https://github.com/akhater/Lupin/commit/b8d0d8a29bf26dba0ed362ca363e23b7a1e116e1
update to https://github.com/akhater/Lupin/releases/tag/v3.2.0e & set timestampEntries = False under [Bot] in the config.ini file to turn it off.
please refer to config.sample.ini for more info
Cheers

amazing thank you so much! It worked without any issues after updating


⚠ RPC server - Arbitrum has degraded performance

In 780eb50, RPC server - Arbitrum ($ARBITRUM_RPC_URL) experienced degraded performance:

HTTP code: 429
Response time: 543 ms

Resolved: RPC server - Arbitrum performance has improved in daf5e16 after 8 minutes.


Fix handling subscription with empty data

I want to merge this change because it fixes #14834
This should not break how any sync webhook work at the moment. The only change will be that if something with subscription was incorrect and payload generation resulted in empty data - it will be logged and returned as None instead of raising an Error. It will work the same as the event was not subscribable.
Additionally some redundant lines from tests were removed.

Impact

[ ] New migrations
[ ] New/Updated API fields or mutations
[ ] Deprecated API fields or mutations
[ ] Removed API types, fields, or mutations

Docs

[ ] Link to documentation:

Pull Request Checklist

[ ] Privileged queries and mutations are either absent or guarded by proper permission checks
[ ] Database queries are optimized and the number of queries is constant
[ ] Database migrations are either absent or optimized for zero downtime
[ ] The changes are covered by test cases
[ ] All new fields/inputs/mutations have proper labels added (ADDED_IN_X, PREVIEW_FEATURE, etc.)
[ ] All migrations have proper dependencies
[ ] All indexes are added concurrently in migrations
[ ] All RunSql and RunPython migrations have revert option defined

@korycins Yes, I double-checked, this PaymentError was not handled anywhere apparently.


DOC: Update estimates [skip travis]

Just noticed that https://mne.tools/dev/cited.html is a year plus out of date. Updating now, and added another step to the release instructions to update this at release time.

https://21042-1301584-gh.circle-artifacts.com/0/dev/cited.html


Less than 10.10 mac versions

i have mac 10.9.5 and i can't download vscode if the version is less than 10.10
i hope you would make a 10.9.x version so that more people can use it.

Electron requires macOS 10.11 (https://www.electronjs.org/docs/tutorial/support#macos) so I don't think that's possible.

https://github.com/microsoft/vscode/issues/126766#issuecomment-864545670 is the reason we can't support it.


FR: Allow customize the format of appended text.

I used another plugin before. This plugin is much stabler and I like it.
I'm wondering if it is possiable for users to customize the format of appended text.
Some reference

I have this on my road map. My plan was to allow a template to be used.

That would be awesome. Your plugin works very well, but doesn't display the text in a way that fits in my notes.  Being able to reconfigure (eg. Not a task, Add time to front like the Memos plugin, move Tag to front, don't use line afterwards) would put this plugin over the top!

You can configure a template to define how the clipping should be formatted. I did add a {{time}} variable that can store date and time depending on how you format it.
I need to document this better.


test: 마무리

:tada: This PR is included in version 1.3.8 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Update scala-compiler, scala-library, ... to 2.12.17 in series/4.x

Updates

org.scala-lang:scala-compiler
org.scala-lang:scala-library
org.scala-lang:scala-reflect

from 2.12.15 to 2.12.17.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Files still referring to the old version number
The following files still refer to the old version number (2.12.15).
You might want to review and update them manually.
CHANGES.md

Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scala-lang" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "@monthly" },
  dependency = { groupId = "org.scala-lang" }
}]

labels: library-update, early-semver-patch, semver-spec-patch, old-version-remains, commit-count:1

Superseded by #1735.


Add frontend k8s configs for staging env

New Behavior
Description
Web UI shows up when visiting https://staging.short-d.com
Screenshots

#281 #194


Users/nigurr/enable code coverage for jacoco

Hi @nigurr, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

It looks like you're a Microsoft contributor (Nitin Gurram). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;


runtime/controller: add flags to configure exponential back-off retry

Add two new flags to enable users to configure exponential back-off retry.
The default values are set to 750ms for minimum retry time, and 15min for max.

@pjbgf this was publish in runtime/v0.14.0