3
3
4
4
#pragma once
5
5
6
- #include " opentimelineio/any.h"
7
6
#include " opentimelineio/version.h"
8
7
8
+ #include < any>
9
9
#include < assert.h>
10
10
#include < map>
11
11
#include < string>
@@ -14,7 +14,7 @@ namespace opentimelineio { namespace OPENTIMELINEIO_VERSION {
14
14
15
15
/* *
16
16
* An AnyDictionary has exactly the same API as
17
- * std::map<std::string, any>
17
+ * std::map<std::string, std:: any>
18
18
*
19
19
* except that it records a "time-stamp" that bumps monotonically every time an
20
20
* operation that would invalidate iterators is performed.
@@ -26,7 +26,7 @@ namespace opentimelineio { namespace OPENTIMELINEIO_VERSION {
26
26
* and take steps to safe-guard themselves from causing a crash. (Yes,
27
27
* I'm talking to you, Python...)
28
28
*/
29
- class AnyDictionary : private std ::map<std::string, any>
29
+ class AnyDictionary : private std ::map<std::string, std:: any>
30
30
{
31
31
public:
32
32
using map::map;
@@ -125,7 +125,7 @@ class AnyDictionary : private std::map<std::string, any>
125
125
// / @TODO: remove all of these @{
126
126
127
127
// if key is in this, and the type of key matches the type of result, then
128
- // set result to the value of any_cast<type>(this[key]) and return true,
128
+ // set result to the value of std:: any_cast<type>(this[key]) and return true,
129
129
// otherwise return false
130
130
template <typename containedType>
131
131
bool get_if_set (const std::string& key, containedType* result) const
@@ -141,7 +141,7 @@ class AnyDictionary : private std::map<std::string, any>
141
141
&& (it->second .type ().hash_code ()
142
142
== typeid (containedType).hash_code ()))
143
143
{
144
- *result = any_cast<containedType>(it->second );
144
+ *result = std:: any_cast<containedType>(it->second );
145
145
return true ;
146
146
}
147
147
else
@@ -171,7 +171,7 @@ class AnyDictionary : private std::map<std::string, any>
171
171
&& (d_it->second .type ().hash_code ()
172
172
== typeid (containedType).hash_code ()))
173
173
{
174
- *result = any_cast<containedType>(d_it->second );
174
+ *result = std:: any_cast<containedType>(d_it->second );
175
175
return true ;
176
176
}
177
177
else
0 commit comments