]> git.sesse.net Git - casparcg/blobdiff - common/ptree.h
Merge pull request #506 from dimitry-ishenko-casparcg/fixes-flags
[casparcg] / common / ptree.h
index a45e838b396e6c414d5a262c4561c3398565e2fc..41d796f3aaef8080ddb16344dbc4281ebdb16a2f 100644 (file)
@@ -50,7 +50,7 @@ T ptree_get(const Ptree& ptree, const typename Ptree::key_type& path)
 {
        try
        {
-               return ptree.get<T>(path);
+               return ptree.template get<T>(path);
        }
        catch (boost::property_tree::ptree_bad_path&)
        {
@@ -68,7 +68,7 @@ T ptree_get_value(const Ptree& ptree)
 {
        try
        {
-               return ptree.get_value<T>();
+               return ptree.template get_value<T>();
        }
        catch (const boost::property_tree::ptree_bad_data& e)
        {
@@ -196,7 +196,7 @@ template <typename Key, typename Ptree, typename Str>
 void ptree_verify_element_name(const std::pair<const Key, Ptree>& elem, const Str& expected)
 {
        if (elem.first != expected)
-               CASPAR_THROW_EXCEPTION(ptree_exception() << msg_info("Expected element named " + u8(expected)));
+               CASPAR_THROW_EXCEPTION(ptree_exception() << msg_info("Expected element named " + u8(expected) + ". Was " + u8(elem.first)));
 }
 
 }