/src/spotify-json/include/spotify/json/default_codec.hpp
Line | Count | Source |
1 | | /* |
2 | | * Copyright (c) 2015-2016 Spotify AB |
3 | | * |
4 | | * Licensed under the Apache License, Version 2.0 (the "License"); you may not |
5 | | * use this file except in compliance with the License. You may obtain a copy of |
6 | | * the License at |
7 | | * |
8 | | * http://www.apache.org/licenses/LICENSE-2.0 |
9 | | * |
10 | | * Unless required by applicable law or agreed to in writing, software |
11 | | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
12 | | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
13 | | * License for the specific language governing permissions and limitations under |
14 | | * the License. |
15 | | */ |
16 | | |
17 | | #pragma once |
18 | | |
19 | | namespace spotify { |
20 | | namespace json { |
21 | | |
22 | | /** |
23 | | * Overload this template for types that default_codec<T>() should support. |
24 | | * |
25 | | * The overloaded class should have one static method codec() that returns |
26 | | * a codec by value for that type. |
27 | | */ |
28 | | template <typename T> |
29 | | struct default_codec_t; |
30 | | |
31 | | template <typename T> |
32 | 4.63k | decltype(default_codec_t<T>::codec()) default_codec() { |
33 | 4.63k | return default_codec_t<T>::codec(); |
34 | 4.63k | } fuzz_decode.cpp:_ZN7spotify4json13default_codecIN12_GLOBAL__N_110custom_objEEEDTclsr15default_codec_tIT_EE5codecEEv Line | Count | Source | 32 | 2.31k | decltype(default_codec_t<T>::codec()) default_codec() { | 33 | 2.31k | return default_codec_t<T>::codec(); | 34 | 2.31k | } |
_ZN7spotify4json13default_codecINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEEDTclsr15default_codec_tIT_EE5codecEEv Line | Count | Source | 32 | 2.31k | decltype(default_codec_t<T>::codec()) default_codec() { | 33 | 2.31k | return default_codec_t<T>::codec(); | 34 | 2.31k | } |
|
35 | | |
36 | | } // namespace json |
37 | | } // namespace spotify |