Skip to content

Commit 1c9c604

Browse files
authored
Merge pull request vim-jp#51 from Smattr/785fdee6-4c40-4ebc-9c75-1855a9e1b550
add support for shared_ptr casts
2 parents 8cb68fe + 48302b2 commit 1c9c604

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

syntax/cpp.vim

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ if !exists("cpp_no_cpp11")
4242
syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE
4343
syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE
4444
syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
45+
syn match cppCast "\<\(const\|static\|dynamic\)_pointer_cast\s*<"me=e-1
46+
syn match cppCast "\<\(const\|static\|dynamic\)_pointer_cast\s*$"
4547
endif
4648

4749
" C++ 14 extensions
@@ -53,6 +55,12 @@ if !exists("cpp_no_cpp14")
5355
syn case match
5456
endif
5557

58+
" C++ 17 extensions
59+
if !exists("cpp_no_cpp17")
60+
syn match cppCast "\<reinterpret_pointer_cast\s*<"me=e-1
61+
syn match cppCast "\<reinterpret_pointer_cast\s*$"
62+
endif
63+
5664
" C++ 20 extensions
5765
if !exists("cpp_no_cpp20")
5866
syn keyword cppStatement co_await co_return co_yield requires

0 commit comments

Comments
 (0)