Skip to content

Commit

Permalink
sys/cbprintf: Limit C++ rvalue references to compatible standards
Browse files Browse the repository at this point in the history
This feature didn't appear until C++11, so don't expose our wrapper
for it in C++98.

Signed-off-by: Andy Ross <andyross@google.com>
  • Loading branch information
andyross committed Mar 1, 2023
1 parent 066df88 commit 8d585b8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/zephyr/sys/cbprintf_cxx.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,12 @@ struct z_cbprintf_cxx_remove_reference < T & > {
typedef T type;
};

#ifndef CONFIG_STD_CPP98
template < typename T >
struct z_cbprintf_cxx_remove_reference < T && > {
typedef T type;
};
#endif

template < typename T >
struct z_cbprintf_cxx_remove_cv {
Expand Down

0 comments on commit 8d585b8

Please sign in to comment.