@@ -53,15 +53,15 @@ struct CoreException
5353};
5454
5555
56- BOND_NORETURN inline void MergerContainerException (uint32_t payload, uint32_t obj)
56+ [[noreturn]] inline void MergerContainerException (uint32_t payload, uint32_t obj)
5757{
5858 BOND_THROW (CoreException,
5959 " Merge failed: container mismatch, length in the payload: "
6060 << payload << " length in the object: " << obj);
6161}
6262
6363
64- BOND_NORETURN inline void InvalidKeyTypeException ()
64+ [[noreturn]] inline void InvalidKeyTypeException ()
6565{
6666 BOND_THROW (CoreException,
6767 " Map key type not valid" );
@@ -71,7 +71,7 @@ BOND_NORETURN inline void InvalidKeyTypeException()
7171namespace detail
7272{
7373 template <typename Key>
74- BOND_NORETURN inline void ElementNotFoundExceptionHelper (
74+ [[noreturn]] inline void ElementNotFoundExceptionHelper (
7575 const Key& key,
7676 typename boost::enable_if<is_wstring<Key>>::type* = nullptr )
7777 {
@@ -91,7 +91,7 @@ namespace detail
9191 }
9292
9393 template <typename Key>
94- BOND_NORETURN inline void ElementNotFoundExceptionHelper (
94+ [[noreturn]] inline void ElementNotFoundExceptionHelper (
9595 const Key& key,
9696 typename boost::disable_if<is_wstring<Key>>::type* = nullptr )
9797 {
@@ -102,56 +102,56 @@ namespace detail
102102
103103
104104template <typename Key>
105- BOND_NORETURN inline void ElementNotFoundException (const Key& key)
105+ [[noreturn]] inline void ElementNotFoundException (const Key& key)
106106{
107107 detail::ElementNotFoundExceptionHelper (key);
108108}
109109
110110
111- BOND_NORETURN inline void UnknownProtocolException ()
111+ [[noreturn]] inline void UnknownProtocolException ()
112112{
113113 BOND_THROW (CoreException,
114114 " Unmarshaling failed: unsupported protocol" );
115115}
116116
117117
118- BOND_NORETURN inline void UnknownProtocolException (uint16_t magic)
118+ [[noreturn]] inline void UnknownProtocolException (uint16_t magic)
119119{
120120 BOND_THROW (CoreException,
121121 " Unsupported protocol: "
122122 << (char )(magic & 0xFF ) << (char )(magic >> 8 ));
123123}
124124
125125
126- BOND_NORETURN inline void NothingException ()
126+ [[noreturn]] inline void NothingException ()
127127{
128128 BOND_THROW (CoreException,
129129 " Field value is 'nothing'" );
130130}
131131
132132
133- BOND_NORETURN inline void InvalidEnumValueException (const char * value, const char * enum_)
133+ [[noreturn]] inline void InvalidEnumValueException (const char * value, const char * enum_)
134134{
135135 BOND_THROW (bond::CoreException,
136136 " Unexpected value " << value << " for enum " << enum_);
137137}
138138
139139
140- BOND_NORETURN inline void InvalidEnumValueException (int32_t value, const char * enum_)
140+ [[noreturn]] inline void InvalidEnumValueException (int32_t value, const char * enum_)
141141{
142142 BOND_THROW (bond::CoreException,
143143 " Unexpected value " << value << " for enum " << enum_);
144144}
145145
146146
147- BOND_NORETURN inline void RapidJsonException (const char * error, size_t offset)
147+ [[noreturn]] inline void RapidJsonException (const char * error, size_t offset)
148148{
149149 BOND_THROW (CoreException,
150150 " JSON parser error: " << error << " at offset " << offset);
151151}
152152
153153
154- BOND_NORETURN inline void UnicodeConversionException ()
154+ [[noreturn]] inline void UnicodeConversionException ()
155155{
156156 BOND_THROW (CoreException,
157157 " Unicode conversion exception" );
@@ -176,7 +176,7 @@ struct SchemaValidateException
176176};
177177
178178
179- BOND_NORETURN
179+ [[noreturn]]
180180inline void StructBaseDifferentException (const StructDef& src,
181181 const StructDef& dst)
182182{
@@ -186,7 +186,7 @@ inline void StructBaseDifferentException(const StructDef& src,
186186}
187187
188188
189- BOND_NORETURN
189+ [[noreturn]]
190190inline void RequiredFieldMissingException (const StructDef& s_dst,
191191 const FieldDef& f_dst)
192192{
@@ -196,7 +196,7 @@ inline void RequiredFieldMissingException(const StructDef& s_dst,
196196}
197197
198198
199- BOND_NORETURN
199+ [[noreturn]]
200200inline void OptionalToRequiredException (const StructDef& s_src,
201201 const StructDef& s_dst,
202202 const FieldDef& f_src,
@@ -209,7 +209,7 @@ inline void OptionalToRequiredException(const StructDef& s_src,
209209}
210210
211211
212- BOND_NORETURN
212+ [[noreturn]]
213213inline void FieldTypeIncompatibleException (const StructDef& s_src,
214214 const StructDef& s_dst,
215215 const FieldDef& f_src,
@@ -222,7 +222,7 @@ inline void FieldTypeIncompatibleException(const StructDef& s_src,
222222}
223223
224224
225- BOND_NORETURN inline void UnknownSchemaDefException (uint16_t id)
225+ [[noreturn]] inline void UnknownSchemaDefException (uint16_t id)
226226{
227227 BOND_THROW (SchemaValidateException,
228228 " Failed to validate schema compatibility; "
0 commit comments