Commit 416d443
Fixes compiler error (AppleClang,Gcc) in using std::atomic values as printf arguments (#826)
Compiler error in AppleClang (Xcode8) is
/Users/mark/dev/Thirdparty/OSL-1.9/src/liboslcomp/ast.cpp:76:33: error: call to implicitly-deleted copy constructor of 'std::atomic<int>'
i, node_counts[i], node_counts_peak[i]);
^~~~~~~~~~~~~~
Compiler error in Gcc (4.8) is
/home/mark/dev/Thirdparty/OSL-1.9/src/liboslcomp/ast.cpp:76:68: error: use of deleted function ‘std::atomic<int>::atomic(const std::atomic<int>&)’
i, node_counts[i], node_counts_peak[i]);
^
Believe this is a problem because printf accepts arguments by value, whereas OIIO 1.8's Strutil::printf takes by reference, and you can't copy a std::atomic.1 parent 848aa8e commit 416d443
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
0 commit comments