Skip to content

Commit 9344c8e

Browse files
committed
add support for shared_ptr casts
Note that this commit also introduces a new config variable, cpp_no_cpp17.
1 parent 1ddd7e3 commit 9344c8e

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
@@ -41,6 +41,8 @@ if !exists("cpp_no_cpp11")
4141
syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE
4242
syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE
4343
syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
44+
syn match cppCast "\<\(const\|static\|dynamic\)_pointer_cast\s*<"me=e-1
45+
syn match cppCast "\<\(const\|static\|dynamic\)_pointer_cast\s*$"
4446
endif
4547

4648
" C++ 14 extensions
@@ -52,6 +54,12 @@ if !exists("cpp_no_cpp14")
5254
syn case match
5355
endif
5456

57+
" C++ 17 extensions
58+
if !exists("cpp_no_cpp17")
59+
syn match cppCast "\<reinterpret_pointer_cast\s*<"me=e-1
60+
syn match cppCast "\<reinterpret_pointer_cast\s*$"
61+
endif
62+
5563
" The minimum and maximum operators in GNU C++
5664
syn match cppMinMax "[<>]?"
5765

0 commit comments

Comments
 (0)