xtd
1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
xtd.core
include
xtd
internal
__as_double.hpp
Go to the documentation of this file.
1
3
#pragma once
4
6
#if !defined(__XTD_CORE_INTERNAL__)
7
#error "Do not include this file: Internal use only"
8
#endif
10
11
#define __XTD_STD_INTERNAL__
12
#include "
__xtd_std_version.hpp
"
13
#undef __XTD_STD_INTERNAL__
14
16
namespace
xtd
{
35
template
<>
36
[[nodiscard]]
inline
auto
as<double>
(
xtd::any
value) ->
double
{
37
return
xtd::convert::to_double
(value);
38
}
39
57
template
<>
58
[[nodiscard]]
inline
auto
as<double>
(
bool
value) ->
double
{
59
return
xtd::convert::to_double
(value);
60
}
61
79
template
<>
80
[[nodiscard]]
inline
auto
as<double>
(
xtd::byte
value) ->
double
{
81
return
xtd::convert::to_double
(value);
82
}
83
102
template
<>
103
[[nodiscard]]
inline
auto
as<double>
(
char
value) ->
double
{
104
return
xtd::convert::to_double
(value);
105
}
106
125
template
<>
126
[[nodiscard]]
inline
auto
as<double>
(
xtd::char8
value) ->
double
{
127
return
xtd::convert::to_double
(value);
128
}
129
148
template
<>
149
[[nodiscard]]
inline
auto
as<double>
(
xtd::char16
value) ->
double
{
150
return
xtd::convert::to_double
(value);
151
}
152
171
template
<>
172
[[nodiscard]]
inline
auto
as<double>
(
xtd::char32
value) ->
double
{
173
return
xtd::convert::to_double
(value);
174
}
175
194
template
<>
195
[[nodiscard]]
inline
auto
as<double>
(
xtd::wchar
value) ->
double
{
196
return
xtd::convert::to_double
(value);
197
}
198
216
template
<>
217
[[nodiscard]]
inline
auto
as<double>
(
xtd::decimal
value) ->
double
{
218
return
xtd::convert::to_double
(value);
219
}
220
238
template
<>
239
[[nodiscard]]
inline
auto
as<double>
(
double
value) ->
double
{
240
return
xtd::convert::to_double
(value);
241
}
242
260
template
<>
261
[[nodiscard]]
inline
auto
as<double>
(
float
value) ->
double
{
262
return
xtd::convert::to_double
(value);
263
}
264
282
template
<>
283
[[nodiscard]]
inline
auto
as<double>
(
xtd::int16
value) ->
double
{
284
return
xtd::convert::to_double
(value);
285
}
286
304
template
<>
305
[[nodiscard]]
inline
auto
as<double>
(
xtd::int32
value) ->
double
{
306
return
xtd::convert::to_double
(value);
307
}
308
326
template
<>
327
[[nodiscard]]
inline
auto
as<double>
(
xtd::int64
value) ->
double
{
328
return
xtd::convert::to_double
(value);
329
}
330
348
template
<>
349
[[nodiscard]]
inline
auto
as<double>
(
xtd::slong
value) ->
double
{
350
return
xtd::convert::to_double
(value);
351
}
352
370
template
<>
371
[[nodiscard]]
inline
auto
as<double>
(
xtd::sbyte
value) ->
double
{
372
return
xtd::convert::to_double
(value);
373
}
374
392
template
<>
393
[[nodiscard]]
inline
auto
as<double>
(
xtd::uint16
value) ->
double
{
394
return
xtd::convert::to_double
(value);
395
}
396
414
template
<>
415
[[nodiscard]]
inline
auto
as<double>
(
xtd::uint32
value) ->
double
{
416
return
xtd::convert::to_double
(value);
417
}
418
436
template
<>
437
[[nodiscard]]
inline
auto
as<double>
(
xtd::uint64
value) ->
double
{
438
return
xtd::convert::to_double
(value);
439
}
440
458
template
<>
459
[[nodiscard]]
inline
auto
as<double>
(
xtd::ulong
value) ->
double
{
460
return
xtd::convert::to_double
(value);
461
}
462
481
template
<>
482
[[nodiscard]]
inline
auto
as<double>
(
const
xtd::string
& value) ->
double
{
483
return
xtd::convert::to_double
(value);
484
}
485
504
template
<>
505
[[nodiscard]]
inline
auto
as<double>
(
xtd::string
& value) ->
double
{
506
return
xtd::convert::to_double
(value);
507
}
508
527
template
<>
528
[[nodiscard]]
inline
auto
as<double>
(
const
std::string& value) ->
double
{
529
return
xtd::convert::to_double
(value);
530
}
531
550
template
<>
551
[[nodiscard]]
inline
auto
as<double>
(std::string& value) ->
double
{
552
return
xtd::convert::to_double
(value);
553
}
554
573
template
<>
574
[[nodiscard]]
inline
auto
as<double>
(
const
std::u8string& value) ->
double
{
575
return
xtd::convert::to_double
(value);
576
}
577
596
template
<>
597
[[nodiscard]]
inline
auto
as<double>
(std::u8string& value) ->
double
{
598
return
xtd::convert::to_double
(value);
599
}
600
619
template
<>
620
[[nodiscard]]
inline
auto
as<double>
(
const
std::u16string& value) ->
double
{
621
return
xtd::convert::to_double
(value);
622
}
623
642
template
<>
643
[[nodiscard]]
inline
auto
as<double>
(std::u16string& value) ->
double
{
644
return
xtd::convert::to_double
(value);
645
}
646
665
template
<>
666
[[nodiscard]]
inline
auto
as<double>
(
const
std::u32string& value) ->
double
{
667
return
xtd::convert::to_double
(value);
668
}
669
688
template
<>
689
[[nodiscard]]
inline
auto
as<double>
(std::u32string& value) ->
double
{
690
return
xtd::convert::to_double
(value);
691
}
692
711
template
<>
712
[[nodiscard]]
inline
auto
as<double>
(
const
std::wstring& value) ->
double
{
713
return
xtd::convert::to_double
(value);
714
}
715
734
template
<>
735
[[nodiscard]]
inline
auto
as<double>
(std::wstring& value) ->
double
{
736
return
xtd::convert::to_double
(value);
737
}
738
757
template
<>
758
[[nodiscard]]
inline
auto
as<double>
(
const
char
* value) ->
double
{
759
return
xtd::convert::to_double
(value);
760
}
761
780
template
<>
781
[[nodiscard]]
inline
auto
as<double>
(
char
* value) ->
double
{
782
return
xtd::convert::to_double
(value);
783
}
784
803
template
<>
804
[[nodiscard]]
inline
auto
as<double>
(
const
xtd::char8
* value) ->
double
{
805
return
xtd::convert::to_double
(value);
806
}
807
826
template
<>
827
[[nodiscard]]
inline
auto
as<double>
(
xtd::char8
* value) ->
double
{
828
return
xtd::convert::to_double
(value);
829
}
830
849
template
<>
850
[[nodiscard]]
inline
auto
as<double>
(
const
xtd::char16
* value) ->
double
{
851
return
xtd::convert::to_double
(value);
852
}
853
872
template
<>
873
[[nodiscard]]
inline
auto
as<double>
(
xtd::char16
* value) ->
double
{
874
return
xtd::convert::to_double
(value);
875
}
876
895
template
<>
896
[[nodiscard]]
inline
auto
as<double>
(
const
xtd::char32
* value) ->
double
{
897
return
xtd::convert::to_double
(value);
898
}
899
918
template
<>
919
[[nodiscard]]
inline
auto
as<double>
(
xtd::char32
* value) ->
double
{
920
return
xtd::convert::to_double
(value);
921
}
922
941
template
<>
942
[[nodiscard]]
inline
auto
as<double>
(
const
xtd::wchar
* value) ->
double
{
943
return
xtd::convert::to_double
(value);
944
}
945
964
template
<>
965
[[nodiscard]]
inline
auto
as<double>
(
xtd::wchar
* value) ->
double
{
966
return
xtd::convert::to_double
(value);
967
}
968
}
__xtd_std_version.hpp
xtd::convert::to_double
static auto to_double(xtd::any value) -> double
Convert xtd::any to double.
xtd::string
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition
__string_definitions.hpp:43
xtd::int64
std::int64_t int64
Represents a 64-bit signed integer.
Definition
int64.hpp:23
xtd::uint32
std::uint32_t uint32
Represents a 32-bit unsigned integer.
Definition
uint32.hpp:23
xtd::char8
char8_t char8
Represents a 8-bit unicode character.
Definition
char8.hpp:26
xtd::slong
__slong__ slong
Represents a 32-bit or 64-bit signed integer.
Definition
slong.hpp:27
xtd::sbyte
std::int8_t sbyte
Represents a 8-bit signed integer.
Definition
sbyte.hpp:23
xtd::wchar
wchar_t wchar
Represents a wide character.
Definition
wchar.hpp:24
xtd::ulong
__ulong__ ulong
Represents a 32-bit or 64-bit unsigned integer.
Definition
ulong.hpp:27
xtd::decimal
long double decimal
Represents a decimal-precision floating-point number.
Definition
decimal.hpp:23
xtd::uint16
std::uint16_t uint16
Represents a 16-bit unsigned integer.
Definition
uint16.hpp:23
xtd::char16
char16_t char16
Represents a 16-bit unicode character.
Definition
char16.hpp:26
xtd::int32
std::int32_t int32
Represents a 32-bit signed integer.
Definition
int32.hpp:25
xtd::int16
std::int16_t int16
Represents a 16-bit signed integer.
Definition
int16.hpp:23
xtd::uint64
std::uint64_t uint64
Represents a 64-bit unsigned integer.
Definition
uint64.hpp:23
xtd::byte
std::uint8_t byte
Represents a 8-bit unsigned integer.
Definition
byte.hpp:23
xtd::char32
char32_t char32
Represents a 32-bit unicode character.
Definition
char32.hpp:23
xtd::any
std::any any
Represents the any alias on std::any.
Definition
any.hpp:24
xtd::as< double >
auto as< double >(xtd::any value) -> double
Casts a type into another type.
Definition
__as_double.hpp:36
xtd
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition
abstract_object.hpp:8
Generated on
for xtd by
Gammasoft
. All rights reserved.