FTXUI
7.0.3
C++ functional terminal UI.
Loading...
Searching...
No Matches
ref.cpp
Go to the documentation of this file.
1
// Copyright 2026 Arthur Sonzogni. All rights reserved.
2
// Use of this source code is governed by the MIT license that can be found in
3
// the LICENSE file.
4
#include "
ftxui/util/ref.hpp
"
5
6
#include <utility>
7
8
namespace
ftxui
{
9
10
namespace
{
11
12
// StringRef、ConstStringRef、ConstStringListRef はエクスポートされています
13
// (FTXUI_EXPORT(SCREEN)) が、それらのメンバー関数はすべて -- Ref<string>/ConstRef<string>
14
// から継承されたものも含め -- ヘッダー内でインライン定義されており、
15
// libftxui-screen 自体の内部から odr-use されることはありません。Windows では、
16
// MSVC は最初にそれを odr-use するインラインメンバー関数のみを DLL に
17
// 出力(したがって dllexport)します。そうでない場合、dllimport 宣言に対して
18
// リンクする側は未解決の外部シンボルを得ることになります。この関数は、
19
// そのインスタンス化を強制するためだけに存在します。
20
[[maybe_unused]]
void
ForceSymbolInstantiation() {
21
StringRef s =
"a"
;
22
StringRef s2(s);
23
StringRef s3(std::move(s2));
24
s = s3;
25
s = std::move(s3);
26
(void)s();
27
(void)*s;
28
(void)s.operator->();
29
30
ConstStringRef c =
"a"
;
31
ConstStringRef c2(c);
32
ConstStringRef c3(std::move(c2));
33
c = c3;
34
c = std::move(c3);
35
(void)c();
36
(void)*c;
37
38
ConstStringListRef l;
39
ConstStringListRef l2(l);
40
ConstStringListRef l3(std::move(l2));
41
l = l3;
42
l = std::move(l3);
43
(void)l.size();
44
(void)l[0];
45
}
46
47
}
// namespace
48
49
}
// namespace ftxui
ftxui
FTXUI ftxui::名前空間
Definition
animation.hpp:11
ref.hpp