Skip to content
  • Zhao Zhili's avatar
    Fix compilation error · fef36fb7
    Zhao Zhili authored and Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen committed
    
    
    Until C++17, a function could not return a tuple using
    list-initialization.
    
    g++ (Debian 6.3.0-18) has no problem with -std=c++11.
    g++ (Ubuntu 5.4.0-6ubuntu1~16.04.11) failed with:
    
    ../src/filesystem/common/CommonDevice.cpp:85:30: error: converting to ‘std::tuple<bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >’ from initializer list would use explicit constructor ‘constexpr std::tuple<_T1, _T2>::tuple(_U1&&, _U2&&) [with _U1 = bool; _U2 = const std::__cxx11::basic_string<char>&; <template-parameter-2-3> = void; _T1 = bool; _T2 = std::__cxx11::basic_string<char>]’
                 return { true, m };
    Fix #54
    
    Signed-off-by: default avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
    (cherry picked from commit f327e891
    
    )
    Signed-off-by: default avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
    fef36fb7