Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // std::array{ '1','2','3' }
- constexpr auto a_1 = 123_std_char_array;
- // std::array{ '0','x','1','2' }
- constexpr auto a_2 = 0x12_std_char_array;
- // std::array{ '4'.'2','.','1','3' }
- constexpr auto a_3 = 42.13_std_char_array;
- template< char ... Chs >
- inline constexpr decltype(auto) operator"" _std_char_array( )
- {
- // template guide makes this possible
- return std::array { Chs... } ;
- }
- // std::array {'S','t','r','i','n','g'}
- constexpr auto std_char_array_buff_ =
- "String"_std_char_array ;
- inline auto operator"" _X( const char*, size_t);
- constexpr auto string_view_ = "String"sv ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement