Shortand for using multiple names from the same c++ namespace

  abbreviation, c++, namespaces, shorthand

I’m writing a chess program and I’ve defined the classes I’ve created under the chess namespace.
To shorten the code in files that use those classes, i preface it with using chess::Point, chess::Board, chess::Piece and so on.

Is there a way to specify that I’m bringing in scope multiple elements from the same namespaces like in Rust? (Such as use chess::{Point,Board,Piece})

Source: Windows Questions C++

LEAVE A COMMENT