mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
add user-defined literals complex, rational
This commit is contained in:
parent
9e9556b62a
commit
94b146b5cc
7 changed files with 167 additions and 26 deletions
|
@ -39,27 +39,32 @@ namespace sprout {
|
|||
{};
|
||||
|
||||
namespace udl {
|
||||
//
|
||||
// _indexes
|
||||
//
|
||||
template<char... Chars>
|
||||
SPROUT_CONSTEXPR typename sprout::indexes_result<Chars...>::type
|
||||
operator "" _indexes() {
|
||||
return sprout::indexes_result<Chars...>::make();
|
||||
}
|
||||
namespace indexes {
|
||||
//
|
||||
// _indexes
|
||||
//
|
||||
template<char... Chars>
|
||||
SPROUT_CONSTEXPR typename sprout::indexes_result<Chars...>::type
|
||||
operator"" _indexes() {
|
||||
return sprout::indexes_result<Chars...>::make();
|
||||
}
|
||||
|
||||
//
|
||||
// _uindexes
|
||||
//
|
||||
template<char... Chars>
|
||||
SPROUT_CONSTEXPR typename sprout::uindexes_result<Chars...>::type
|
||||
operator "" _uindexes() {
|
||||
return sprout::uindexes_result<Chars...>::make();
|
||||
}
|
||||
//
|
||||
// _uindexes
|
||||
//
|
||||
template<char... Chars>
|
||||
SPROUT_CONSTEXPR typename sprout::uindexes_result<Chars...>::type
|
||||
operator"" _uindexes() {
|
||||
return sprout::uindexes_result<Chars...>::make();
|
||||
}
|
||||
} // namespace indexes
|
||||
|
||||
using sprout::udl::indexes::operator"" _indexes;
|
||||
using sprout::udl::indexes::operator"" _uindexes;
|
||||
} // namespace udl
|
||||
|
||||
using sprout::udl::operator "" _indexes;
|
||||
using sprout::udl::operator "" _uindexes;
|
||||
using sprout::udl::indexes::operator"" _indexes;
|
||||
using sprout::udl::indexes::operator"" _uindexes;
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #if SPROUT_USE_USER_DEFINED_LITERALS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue